home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / U-Z / VideoToolbox 4.95.sit / VideoToolbox / VideoToolboxSources / PixMapToPostScript.c < prev    next >
MacBinary  |  1994-11-15  |  13.0 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Nov 15 05:52:29 1994, modified Tue Nov 15 05:52:29 1994, creator 'MMCC', type ASCII, 11678 bytes "PixMapToPostScript.c" , at 0x2e1e 1386 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID raw Group 3 FAX bitmap default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 50 69 78 4d 61 70 | 54 6f 50 6f 73 74 53 63 |..PixMap|ToPostSc|
|00000010| 72 69 70 74 2e 63 00 00 | 00 00 00 00 00 00 00 00 |ript.c..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 2d 9e 00 | 00 05 6a aa ee 43 6d aa |.....-..|..j..Cm.|
|00000060| ee 43 6d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Cm.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 16 8c 00 00 |........|........|
|00000080| 2f 2a 0d 50 69 78 4d 61 | 70 54 6f 50 6f 73 74 53 |/*.PixMa|pToPostS|
|00000090| 63 72 69 70 74 2e 63 0d | 43 6f 70 79 72 69 67 68 |cript.c.|Copyrigh|
|000000a0| 74 20 a9 20 31 39 39 31 | 2c 31 39 39 32 2c 31 39 |t . 1991|,1992,19|
|000000b0| 39 33 20 44 65 6e 69 73 | 20 47 2e 20 50 65 6c 6c |93 Denis| G. Pell|
|000000c0| 69 0d 0d 09 50 69 78 4d | 61 70 54 6f 50 6f 73 74 |i...PixM|apToPost|
|000000d0| 53 63 72 69 70 74 28 66 | 69 6c 65 6e 61 6d 65 2c |Script(f|ilename,|
|000000e0| 70 6d 2c 72 65 63 74 50 | 74 72 2c 70 61 67 65 52 |pm,rectP|tr,pageR|
|000000f0| 65 63 74 50 74 72 2c 63 | 65 6c 6c 73 50 65 72 49 |ectPtr,c|ellsPerI|
|00000100| 6e 63 68 2c 67 72 61 79 | 4c 65 76 65 6c 73 29 3b |nch,gray|Levels);|
|00000110| 0d 0d 09 54 68 69 73 20 | 69 73 20 61 20 73 69 6d |...This |is a sim|
|00000120| 70 6c 65 20 62 75 74 20 | 72 65 61 73 6f 6e 61 62 |ple but |reasonab|
|00000130| 6c 79 20 67 65 6e 65 72 | 61 6c 20 72 6f 75 74 69 |ly gener|al routi|
|00000140| 6e 65 20 74 6f 20 63 6f | 6e 76 65 72 74 20 61 20 |ne to co|nvert a |
|00000150| 67 72 61 79 73 63 61 6c | 65 0d 50 69 78 4d 61 70 |grayscal|e.PixMap|
|00000160| 20 74 6f 20 61 20 50 6f | 73 74 53 63 72 69 70 74 | to a Po|stScript|
|00000170| 20 66 69 6c 65 20 74 68 | 61 74 20 6d 61 79 20 62 | file th|at may b|
|00000180| 65 20 74 72 61 6e 73 6d | 69 74 74 65 64 20 74 6f |e transm|itted to|
|00000190| 20 61 20 4c 61 73 65 72 | 57 72 69 74 65 72 20 6f | a Laser|Writer o|
|000001a0| 72 20 4c 69 6e 6f 74 79 | 70 65 0d 74 6f 20 70 72 |r Linoty|pe.to pr|
|000001b0| 6f 64 75 63 65 20 61 20 | 68 61 6c 66 74 6f 6e 65 |oduce a |halftone|
|000001c0| 20 69 6d 61 67 65 20 6f | 6e 20 70 61 70 65 72 2e | image o|n paper.|
|000001d0| 20 57 65 20 75 73 65 20 | 69 74 20 61 20 6c 6f 74 | We use |it a lot|
|000001e0| 3b 20 69 74 20 77 6f 72 | 6b 73 20 77 65 6c 6c 2e |; it wor|ks well.|
|000001f0| 0d 09 54 68 65 20 66 69 | 6c 65 6e 61 6d 65 2c 20 |..The fi|lename, |
|00000200| 62 79 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 2c 20 73 |by conve|ntion, s|
|00000210| 68 6f 75 6c 64 20 65 6e | 64 20 69 6e 20 22 2e 70 |hould en|d in ".p|
|00000220| 73 22 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 74 |s" to in|dicate t|
|00000230| 68 61 74 20 69 74 20 69 | 73 0d 61 20 70 6f 73 74 |hat it i|s.a post|
|00000240| 73 63 72 69 70 74 20 66 | 69 6c 65 2c 20 62 75 74 |script f|ile, but|
|00000250| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 65 6e 66 | this is| not enf|
|00000260| 6f 72 63 65 64 2e 20 54 | 68 65 20 66 69 6c 65 27 |orced. T|he file'|
|00000270| 73 20 74 79 70 65 20 69 | 73 20 73 65 74 20 74 6f |s type i|s set to|
|00000280| 20 27 54 45 58 54 27 0d | 77 69 74 68 20 63 72 65 | 'TEXT'.|with cre|
|00000290| 61 74 6f 72 20 27 34 50 | 53 55 27 2c 20 73 6f 20 |ator '4P|SU', so |
|000002a0| 74 68 61 74 20 69 74 20 | 63 61 6e 20 62 65 20 64 |that it |can be d|
|000002b0| 6f 75 62 6c 65 2d 63 6c | 69 63 6b 65 64 20 74 6f |ouble-cl|icked to|
|000002c0| 20 6f 70 65 6e 20 6d 79 | 20 66 61 76 6f 72 69 74 | open my| favorit|
|000002d0| 65 0d 50 6f 73 74 53 63 | 72 69 70 74 20 64 6f 77 |e.PostSc|ript dow|
|000002e0| 6e 6c 6f 61 64 69 6e 67 | 20 70 72 6f 67 72 61 6d |nloading| program|
|000002f0| 2c 20 50 6f 73 74 48 61 | 73 74 65 2e 20 48 6f 77 |, PostHa|ste. How|
|00000300| 65 76 65 72 2c 20 69 74 | 27 73 20 61 20 70 6c 61 |ever, it|'s a pla|
|00000310| 69 6e 20 74 65 78 74 20 | 66 69 6c 65 20 73 6f 0d |in text |file so.|
|00000320| 61 6e 79 20 64 6f 77 6e | 6c 6f 61 64 65 72 20 77 |any down|loader w|
|00000330| 69 6c 6c 20 77 6f 72 6b | 2e 0d 09 54 68 65 20 50 |ill work|...The P|
|00000340| 69 78 4d 61 70 20 6d 75 | 73 74 20 68 61 76 65 20 |ixMap mu|st have |
|00000350| 38 20 62 69 74 73 20 70 | 65 72 20 70 69 78 65 6c |8 bits p|er pixel|
|00000360| 2e 20 4e 6f 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 |. No col|or table|
|00000370| 73 20 61 72 65 20 75 73 | 65 64 2e 20 54 68 65 20 |s are us|ed. The |
|00000380| 72 61 77 0d 70 69 78 65 | 6c 20 76 61 6c 75 65 20 |raw.pixe|l value |
|00000390| 28 41 70 70 6c 65 20 63 | 61 6c 6c 73 20 69 74 20 |(Apple c|alls it |
|000003a0| 61 6e 20 22 69 6e 64 65 | 78 22 29 20 69 73 20 73 |an "inde|x") is s|
|000003b0| 65 6e 74 20 64 69 72 65 | 63 74 6c 79 20 74 6f 20 |ent dire|ctly to |
|000003c0| 74 68 65 20 70 72 69 6e | 74 65 72 20 77 69 74 68 |the prin|ter with|
|000003d0| 20 6e 6f 0d 74 72 61 6e | 73 66 6f 72 6d 61 74 69 | no.tran|sformati|
|000003e0| 6f 6e 2e 20 50 6f 73 74 | 53 63 72 69 70 74 20 61 |on. Post|Script a|
|000003f0| 73 73 75 6d 65 73 20 74 | 68 61 74 20 74 68 65 20 |ssumes t|hat the |
|00000400| 6e 75 6d 62 65 72 2c 20 | 66 72 6f 6d 20 30 20 74 |number, |from 0 t|
|00000410| 6f 20 32 35 35 20 69 73 | 0d 70 72 6f 70 6f 72 74 |o 255 is|.proport|
|00000420| 69 6f 6e 61 6c 20 74 6f | 20 64 65 73 69 72 65 64 |ional to| desired|
|00000430| 20 72 65 66 6c 65 63 74 | 61 6e 63 65 2c 20 66 72 | reflect|ance, fr|
|00000440| 6f 6d 20 7a 65 72 6f 20 | 74 6f 20 31 2e 20 54 68 |om zero |to 1. Th|
|00000450| 65 20 2a 72 65 63 74 50 | 74 72 20 69 6e 64 69 63 |e *rectP|tr indic|
|00000460| 61 74 65 73 20 77 68 61 | 74 0d 70 61 72 74 20 6f |ates wha|t.part o|
|00000470| 66 20 79 6f 75 72 20 50 | 69 78 4d 61 70 20 69 73 |f your P|ixMap is|
|00000480| 20 74 6f 20 62 65 20 75 | 73 65 64 2e 0d 09 54 68 | to be u|sed...Th|
|00000490| 65 20 2a 70 61 67 65 52 | 65 63 74 50 74 72 20 69 |e *pageR|ectPtr i|
|000004a0| 73 20 73 75 62 74 6c 65 | 2e 20 49 74 20 64 65 73 |s subtle|. It des|
|000004b0| 63 72 69 62 65 73 2c 20 | 69 6e 20 74 79 70 6f 67 |cribes, |in typog|
|000004c0| 72 61 70 68 65 72 73 20 | 70 6f 69 6e 74 73 0d 28 |raphers |points.(|
|000004d0| 31 2f 37 32 22 29 2c 20 | 74 68 65 20 72 65 63 74 |1/72"), |the rect|
|000004e0| 61 6e 67 6c 65 20 74 68 | 61 74 20 79 6f 75 72 20 |angle th|at your |
|000004f0| 69 6d 61 67 65 20 77 69 | 6c 6c 20 62 65 20 6d 61 |image wi|ll be ma|
|00000500| 70 70 65 64 20 6f 6e 74 | 6f 20 6f 6e 20 74 68 65 |pped ont|o on the|
|00000510| 20 70 72 69 6e 74 65 64 | 20 70 61 67 65 2e 0d 49 | printed| page..I|
|00000520| 74 20 69 73 20 65 73 73 | 65 6e 74 69 61 6c 20 74 |t is ess|ential t|
|00000530| 68 61 74 20 79 6f 75 20 | 6b 65 65 70 20 69 6e 20 |hat you |keep in |
|00000540| 6d 69 6e 64 20 74 68 61 | 74 20 41 70 70 6c 65 20 |mind tha|t Apple |
|00000550| 61 6e 64 20 41 64 6f 62 | 65 20 75 73 65 20 64 69 |and Adob|e use di|
|00000560| 66 66 65 72 65 6e 74 0d | 63 6f 6f 72 64 69 6e 61 |fferent.|coordina|
|00000570| 74 65 20 73 79 73 74 65 | 6d 73 2e 20 42 6f 74 68 |te syste|ms. Both|
|00000580| 20 41 70 70 6c 65 20 61 | 6e 64 20 41 64 6f 62 65 | Apple a|nd Adobe|
|00000590| 20 69 6e 63 72 65 61 73 | 65 20 78 20 66 72 6f 6d | increas|e x from|
|000005a0| 20 6c 65 66 74 20 74 6f | 20 72 69 67 68 74 2e 20 | left to| right. |
|000005b0| 48 6f 77 65 76 65 72 2c | 0d 41 70 70 6c 65 20 68 |However,|.Apple h|
|000005c0| 61 73 20 79 20 69 6e 63 | 72 65 61 73 69 6e 67 20 |as y inc|reasing |
|000005d0| 66 72 6f 6d 20 74 6f 70 | 20 74 6f 20 62 6f 74 74 |from top| to bott|
|000005e0| 6f 6d 2c 20 77 68 65 72 | 65 61 73 20 41 64 6f 62 |om, wher|eas Adob|
|000005f0| 65 20 69 6e 63 72 65 61 | 73 65 73 20 79 20 66 72 |e increa|ses y fr|
|00000600| 6f 6d 20 62 6f 74 74 6f | 6d 0d 74 6f 20 74 6f 70 |om botto|m.to top|
|00000610| 2e 20 41 64 6f 62 65 27 | 73 20 6f 72 69 67 69 6e |. Adobe'|s origin|
|00000620| 20 69 73 20 74 68 65 20 | 6c 6f 77 65 72 20 6c 65 | is the |lower le|
|00000630| 66 74 20 63 6f 72 6e 65 | 72 20 6f 66 20 74 68 65 |ft corne|r of the|
|00000640| 20 70 61 67 65 2c 20 65 | 76 65 6e 20 74 68 6f 75 | page, e|ven thou|
|00000650| 67 68 20 74 68 61 74 0d | 70 6f 69 6e 74 20 69 73 |gh that.|point is|
|00000660| 20 75 73 75 61 6c 6c 79 | 20 6e 6f 74 20 70 72 69 | usually| not pri|
|00000670| 6e 74 61 62 6c 65 2c 20 | 73 69 6e 63 65 20 6d 6f |ntable, |since mo|
|00000680| 73 74 20 70 72 69 6e 74 | 65 72 73 20 63 61 6e 20 |st print|ers can |
|00000690| 6f 6e 6c 79 20 70 72 69 | 6e 74 20 74 6f 20 77 69 |only pri|nt to wi|
|000006a0| 74 68 69 6e 0d 61 62 6f | 75 74 20 61 20 68 61 6c |thin.abo|ut a hal|
|000006b0| 66 20 69 6e 63 68 20 6f | 66 20 74 68 65 20 65 64 |f inch o|f the ed|
|000006c0| 67 65 2e 20 54 68 65 20 | 70 61 67 65 52 65 63 74 |ge. The |pageRect|
|000006d0| 2c 20 74 68 6f 75 67 68 | 20 73 75 70 70 6c 69 65 |, though| supplie|
|000006e0| 64 20 69 6e 20 41 70 70 | 6c 65 27 73 20 52 65 63 |d in App|le's Rec|
|000006f0| 74 0d 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t.data s|tructure|
|00000700| 2c 20 6d 75 73 74 20 62 | 65 20 69 6e 20 41 64 6f |, must b|e in Ado|
|00000710| 62 65 27 73 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |be's coo|rdinates|
|00000720| 2c 20 72 65 73 70 65 63 | 74 69 6e 67 20 74 68 65 |, respec|ting the|
|00000730| 20 6e 61 6d 65 73 20 6f | 66 20 74 68 65 20 52 65 | names o|f the Re|
|00000740| 63 74 0d 73 74 72 75 63 | 74 75 72 65 27 73 20 66 |ct.struc|ture's f|
|00000750| 69 65 6c 64 73 3a 20 6c | 65 66 74 2c 20 74 6f 70 |ields: l|eft, top|
|00000760| 2c 20 72 69 67 68 74 2c | 20 62 6f 74 74 6f 6d 2e |, right,| bottom.|
|00000770| 20 53 6f 2c 20 66 6f 72 | 20 61 6e 20 69 6d 61 67 | So, for| an imag|
|00000780| 65 20 74 6f 20 66 69 6c | 6c 20 6d 6f 73 74 20 6f |e to fil|l most o|
|00000790| 66 0d 61 6e 20 38 2e 35 | 78 31 31 20 70 61 67 65 |f.an 8.5|x11 page|
|000007a0| 2c 20 77 69 74 68 20 30 | 2e 35 22 20 6d 61 72 67 |, with 0|.5" marg|
|000007b0| 69 6e 73 2c 20 79 6f 75 | 20 6d 69 67 68 74 20 75 |ins, you| might u|
|000007c0| 73 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |se the f|ollowing|
|000007d0| 3a 0d 0d 09 09 53 65 74 | 52 65 63 74 28 26 70 61 |:....Set|Rect(&pa|
|000007e0| 67 65 52 65 63 74 2c 30 | 2e 35 2a 37 32 2c 31 30 |geRect,0|.5*72,10|
|000007f0| 2e 35 2a 37 32 2c 38 2a | 37 32 2c 30 2e 35 2a 37 |.5*72,8*|72,0.5*7|
|00000800| 32 29 3b 0d 0d 09 49 6e | 20 70 72 69 6e 74 69 6e |2);...In| printin|
|00000810| 67 20 50 6f 73 74 53 63 | 72 69 70 74 20 68 61 6c |g PostSc|ript hal|
|00000820| 66 74 6f 6e 65 73 20 74 | 68 65 20 68 61 6c 66 74 |ftones t|he halft|
|00000830| 6f 6e 65 20 63 65 6c 6c | 20 73 69 7a 65 20 64 65 |one cell| size de|
|00000840| 74 65 72 6d 69 6e 65 73 | 20 62 6f 74 68 0d 74 68 |termines| both.th|
|00000850| 65 20 73 70 61 74 69 61 | 6c 20 61 6e 64 20 67 72 |e spatia|l and gr|
|00000860| 61 79 6c 65 76 65 6c 20 | 72 65 73 6f 6c 75 74 69 |aylevel |resoluti|
|00000870| 6f 6e 73 20 6f 66 20 74 | 68 65 20 72 65 73 75 6c |ons of t|he resul|
|00000880| 74 69 6e 67 20 69 6d 61 | 67 65 2e 20 46 6f 72 20 |ting ima|ge. For |
|00000890| 74 68 65 20 63 6f 6e 76 | 65 6e 69 65 6e 63 65 0d |the conv|enience.|
|000008a0| 6f 66 20 74 68 65 20 75 | 73 65 72 20 74 68 69 73 |of the u|ser this|
|000008b0| 20 63 61 6e 20 62 65 20 | 73 70 65 63 69 66 69 65 | can be |specifie|
|000008c0| 64 20 62 79 20 73 65 74 | 74 69 6e 67 20 65 69 74 |d by set|ting eit|
|000008d0| 68 65 72 20 74 68 65 20 | 63 65 6c 6c 73 50 65 72 |her the |cellsPer|
|000008e0| 49 6e 63 68 20 6f 72 20 | 74 68 65 0d 67 72 61 79 |Inch or |the.gray|
|000008f0| 4c 65 76 65 6c 73 20 61 | 72 67 75 6d 65 6e 74 20 |Levels a|rgument |
|00000900| 74 6f 20 74 68 65 20 64 | 65 73 69 72 65 64 20 76 |to the d|esired v|
|00000910| 61 6c 75 65 3b 20 74 68 | 65 20 6f 74 68 65 72 20 |alue; th|e other |
|00000920| 6f 6e 65 20 73 68 6f 75 | 6c 64 20 62 65 20 7a 65 |one shou|ld be ze|
|00000930| 72 6f 2e 20 49 66 20 62 | 6f 74 68 0d 61 72 65 20 |ro. If b|oth.are |
|00000940| 7a 65 72 6f 20 74 68 65 | 6e 20 74 68 65 20 70 72 |zero the|n the pr|
|00000950| 69 6e 74 65 72 20 77 69 | 6c 6c 20 62 65 20 6c 65 |inter wi|ll be le|
|00000960| 66 74 20 61 74 20 69 74 | 73 20 64 65 66 61 75 6c |ft at it|s defaul|
|00000970| 74 20 63 65 6c 6c 20 73 | 69 7a 65 2c 20 77 68 69 |t cell s|ize, whi|
|00000980| 63 68 20 69 73 0d 75 73 | 75 61 6c 6c 79 20 61 20 |ch is.us|ually a |
|00000990| 67 6f 6f 64 20 63 68 6f | 69 63 65 2e 20 4e 6f 74 |good cho|ice. Not|
|000009a0| 65 20 74 68 61 74 20 74 | 68 65 72 65 20 6e 65 65 |e that t|here nee|
|000009b0| 64 20 6e 6f 74 20 62 65 | 20 61 6e 79 20 70 61 72 |d not be| any par|
|000009c0| 74 69 63 75 6c 61 72 20 | 63 6f 72 72 65 73 70 6f |ticular |correspo|
|000009d0| 6e 64 65 6e 63 65 0d 62 | 65 74 77 65 65 6e 20 70 |ndence.b|etween p|
|000009e0| 69 78 65 6c 73 20 69 6e | 20 79 6f 75 72 20 69 6d |ixels in| your im|
|000009f0| 61 67 65 20 61 6e 64 20 | 63 65 6c 6c 73 20 69 6e |age and |cells in|
|00000a00| 20 74 68 65 20 68 61 6c | 66 74 6f 6e 65 3b 20 74 | the hal|ftone; t|
|00000a10| 68 65 20 70 72 69 6e 74 | 65 72 0d 61 75 74 6f 6d |he print|er.autom|
|00000a20| 61 74 69 63 61 6c 6c 79 | 20 72 65 73 61 6d 70 6c |atically| resampl|
|00000a30| 65 73 20 79 6f 75 72 20 | 69 6d 61 67 65 20 74 6f |es your |image to|
|00000a40| 20 70 72 6f 64 75 63 65 | 20 74 68 65 20 68 61 6c | produce| the hal|
|00000a50| 66 74 6f 6e 65 2e 0d 09 | 49 66 20 79 6f 75 20 73 |ftone...|If you s|
|00000a60| 65 74 20 63 65 6c 6c 73 | 50 65 72 49 6e 63 68 20 |et cells|PerInch |
|00000a70| 74 6f 20 61 20 6e 6f 6e | 7a 65 72 6f 20 76 61 6c |to a non|zero val|
|00000a80| 75 65 20 74 68 65 6e 20 | 74 68 65 20 70 72 69 6e |ue then |the prin|
|00000a90| 74 65 72 20 77 69 6c 6c | 20 62 65 0d 61 73 6b 65 |ter will| be.aske|
|00000aa0| 64 20 74 6f 20 70 72 69 | 6e 74 20 69 74 73 20 68 |d to pri|nt its h|
|00000ab0| 61 6c 66 74 6f 6e 65 20 | 77 69 74 68 20 74 68 61 |alftone |with tha|
|00000ac0| 74 20 6d 61 6e 79 20 68 | 61 6c 66 74 6f 6e 65 20 |t many h|alftone |
|00000ad0| 63 65 6c 6c 73 20 70 65 | 72 20 69 6e 63 68 2e 20 |cells pe|r inch. |
|00000ae0| 45 2e 67 2e 20 74 6f 0d | 70 72 6f 64 75 63 65 20 |E.g. to.|produce |
|00000af0| 61 20 68 61 6c 66 74 6f | 6e 65 20 6f 72 69 67 69 |a halfto|ne origi|
|00000b00| 6e 61 6c 20 66 6f 72 20 | 73 75 62 73 65 71 75 65 |nal for |subseque|
|00000b10| 6e 74 20 6f 6e 65 2d 74 | 6f 2d 6f 6e 65 20 72 65 |nt one-t|o-one re|
|00000b20| 70 72 6f 64 75 63 74 69 | 6f 6e 20 69 6e 20 61 20 |producti|on in a |
|00000b30| 6a 6f 75 72 6e 61 6c 2c | 0d 79 6f 75 27 6c 6c 20 |journal,|.you'll |
|00000b40| 77 61 6e 74 20 74 68 65 | 20 63 65 6c 6c 73 20 74 |want the| cells t|
|00000b50| 6f 20 62 65 20 63 6f 61 | 72 73 65 20 65 6e 6f 75 |o be coa|rse enou|
|00000b60| 67 68 20 66 6f 72 20 74 | 68 65 6d 20 74 6f 20 72 |gh for t|hem to r|
|00000b70| 65 70 72 6f 64 75 63 65 | 20 77 69 74 68 6f 75 74 |eproduce| without|
|00000b80| 0d 72 65 2d 73 63 72 65 | 65 6e 69 6e 67 2c 20 65 |.re-scre|ening, e|
|00000b90| 2e 67 2e 20 31 30 30 20 | 63 65 6c 6c 73 20 70 65 |.g. 100 |cells pe|
|00000ba0| 72 20 69 6e 63 68 2e 0d | 09 41 6c 74 65 72 6e 61 |r inch..|.Alterna|
|00000bb0| 74 69 76 65 6c 79 2c 20 | 69 66 20 79 6f 75 20 73 |tively, |if you s|
|00000bc0| 65 74 20 67 72 61 79 4c | 65 76 65 6c 73 20 74 6f |et grayL|evels to|
|00000bd0| 20 61 20 6e 6f 6e 7a 65 | 72 6f 20 76 61 6c 75 65 | a nonze|ro value|
|00000be0| 20 74 68 65 6e 20 74 68 | 65 20 70 72 69 6e 74 65 | then th|e printe|
|00000bf0| 72 0d 77 69 6c 6c 20 62 | 65 20 61 73 6b 65 64 20 |r.will b|e asked |
|00000c00| 74 6f 20 70 72 69 6e 74 | 20 69 74 73 20 68 61 6c |to print| its hal|
|00000c10| 66 74 6f 6e 65 20 77 69 | 74 68 20 63 65 6c 6c 73 |ftone wi|th cells|
|00000c20| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 67 72 61 79 | contain|ing gray|
|00000c30| 4c 65 76 65 6c 73 2d 31 | 20 70 72 69 6e 74 65 72 |Levels-1| printer|
|00000c40| 0d 70 69 78 65 6c 73 2c | 20 79 69 65 6c 64 69 6e |.pixels,| yieldin|
|00000c50| 67 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |g the sp|ecified |
|00000c60| 6e 75 6d 62 65 72 20 6f | 66 20 67 72 61 79 20 6c |number o|f gray l|
|00000c70| 65 76 65 6c 73 2e 20 45 | 2e 67 2e 20 79 6f 75 20 |evels. E|.g. you |
|00000c80| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 0d 66 6f |might wa|nt to.fo|
|00000c90| 72 63 65 20 79 6f 75 72 | 20 33 30 30 20 64 70 69 |rce your| 300 dpi|
|00000ca0| 20 4c 61 73 65 72 57 72 | 69 74 65 72 20 74 6f 20 | LaserWr|iter to |
|00000cb0| 75 73 65 20 62 69 67 20 | 63 65 6c 6c 73 20 79 69 |use big |cells yi|
|00000cc0| 65 6c 64 69 6e 67 20 32 | 35 36 20 67 72 61 79 20 |elding 2|56 gray |
|00000cd0| 6c 65 76 65 6c 73 2e 0d | 09 59 6f 75 20 73 68 6f |levels..|.You sho|
|00000ce0| 75 6c 64 20 72 65 6d 6f | 76 65 28 29 20 61 6e 79 |uld remo|ve() any|
|00000cf0| 20 70 72 65 2d 65 78 69 | 73 74 69 6e 67 20 6f 6c | pre-exi|sting ol|
|00000d00| 64 20 66 69 6c 65 20 6f | 66 20 74 68 65 20 73 61 |d file o|f the sa|
|00000d10| 6d 65 20 6e 61 6d 65 2c | 20 75 6e 6c 65 73 73 0d |me name,| unless.|
|00000d20| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 61 70 70 65 |you want| to appe|
|00000d30| 6e 64 20 74 6f 20 69 74 | 2e 20 50 69 78 4d 61 70 |nd to it|. PixMap|
|00000d40| 54 6f 50 6f 73 74 53 63 | 72 69 70 74 20 61 6c 77 |ToPostSc|ript alw|
|00000d50| 61 79 73 20 61 70 70 65 | 6e 64 73 20 74 6f 20 61 |ays appe|nds to a|
|00000d60| 6e 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 0d |n existi|ng file.|
|00000d70| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 6e 61 |with the| same na|
|00000d80| 6d 65 2c 20 69 66 20 6f | 6e 65 20 65 78 69 73 74 |me, if o|ne exist|
|00000d90| 73 2c 20 74 6f 20 61 6c | 6c 6f 77 20 79 6f 75 20 |s, to al|low you |
|00000da0| 74 6f 20 70 6c 61 63 65 | 20 73 65 76 65 72 61 6c |to place| several|
|00000db0| 20 69 6d 61 67 65 73 20 | 6f 6e 74 6f 20 61 0d 70 | images |onto a.p|
|00000dc0| 61 67 65 2e 20 28 59 6f | 75 20 73 68 6f 75 6c 64 |age. (Yo|u should|
|00000dd0| 20 6f 66 66 73 65 74 20 | 74 68 65 69 72 20 70 61 | offset |their pa|
|00000de0| 67 65 52 65 63 74 73 20 | 75 6e 6c 65 73 73 20 79 |geRects |unless y|
|00000df0| 6f 75 20 77 61 6e 74 20 | 74 68 65 20 69 6d 61 67 |ou want |the imag|
|00000e00| 65 73 20 74 6f 0d 73 75 | 70 65 72 69 6d 70 6f 73 |es to.su|perimpos|
|00000e10| 65 2e 29 0d 09 59 6f 75 | 20 77 69 6c 6c 20 6e 65 |e.)..You| will ne|
|00000e20| 65 64 20 74 6f 20 61 64 | 64 20 61 20 22 73 68 6f |ed to ad|d a "sho|
|00000e30| 77 70 61 67 65 5c 6e 22 | 20 63 6f 6d 6d 61 6e 64 |wpage\n"| command|
|00000e40| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | at the |end of t|
|00000e50| 68 65 20 70 6f 73 74 73 | 63 72 69 70 74 0d 66 69 |he posts|cript.fi|
|00000e60| 6c 65 2e 20 54 68 69 73 | 20 69 73 20 74 68 65 20 |le. This| is the |
|00000e70| 63 6f 6d 6d 61 6e 64 20 | 74 68 61 74 20 74 65 6c |command |that tel|
|00000e80| 6c 73 20 74 68 65 20 70 | 72 69 6e 74 65 72 20 74 |ls the p|rinter t|
|00000e90| 6f 20 67 6f 20 61 68 65 | 61 64 20 61 6e 64 20 70 |o go ahe|ad and p|
|00000ea0| 72 69 6e 74 0d 74 68 65 | 20 70 61 67 65 2e 20 55 |rint.the| page. U|
|00000eb0| 73 65 20 74 68 65 20 73 | 75 62 72 6f 75 74 69 6e |se the s|ubroutin|
|00000ec0| 65 20 41 70 70 65 6e 64 | 54 6f 46 69 6c 65 28 66 |e Append|ToFile(f|
|00000ed0| 69 6c 65 6e 61 6d 65 2c | 22 73 68 6f 77 70 61 67 |ilename,|"showpag|
|00000ee0| 65 5c 6e 22 29 2c 20 73 | 75 70 70 6c 69 65 64 20 |e\n"), s|upplied |
|00000ef0| 66 6f 72 20 74 68 69 73 | 0d 70 75 72 70 6f 73 65 |for this|.purpose|
|00000f00| 2e 20 4e 61 74 75 72 61 | 6c 6c 79 2c 20 79 6f 75 |. Natura|lly, you|
|00000f10| 20 63 6f 75 6c 64 20 61 | 6c 73 6f 20 75 73 65 20 | could a|lso use |
|00000f20| 74 6f 20 74 68 69 73 20 | 74 6f 20 61 64 64 20 79 |to this |to add y|
|00000f30| 6f 75 72 20 6f 77 6e 20 | 70 6f 73 74 73 63 72 69 |our own |postscri|
|00000f40| 70 74 0d 63 6f 6d 6d 61 | 6e 64 73 20 62 65 66 6f |pt.comma|nds befo|
|00000f50| 72 65 20 6f 72 20 61 66 | 74 65 72 20 74 68 65 20 |re or af|ter the |
|00000f60| 69 6d 61 67 69 6e 67 20 | 63 6f 64 65 20 69 6e 73 |imaging |code ins|
|00000f70| 65 72 74 65 64 20 62 79 | 20 50 69 78 4d 61 70 54 |erted by| PixMapT|
|00000f80| 6f 50 6f 73 74 53 63 72 | 69 70 74 2e 0d 09 48 65 |oPostScr|ipt...He|
|00000f90| 72 65 27 73 20 61 20 6d | 69 6e 69 6d 61 6c 20 65 |re's a m|inimal e|
|00000fa0| 78 61 6d 70 6c 65 20 6f | 66 20 74 68 65 20 74 68 |xample o|f the th|
|00000fb0| 72 65 65 20 63 6f 6d 6d | 61 6e 64 73 3a 0d 0d 09 |ree comm|ands:...|
|00000fc0| 09 72 65 6d 6f 76 65 28 | 22 74 65 73 74 2e 70 73 |.remove(|"test.ps|
|00000fd0| 22 29 3b 0d 09 09 50 69 | 78 4d 61 70 54 6f 50 6f |");...Pi|xMapToPo|
|00000fe0| 73 74 53 63 72 69 70 74 | 28 22 74 65 73 74 2e 70 |stScript|("test.p|
|00000ff0| 73 22 2c 70 69 78 4d 61 | 70 48 61 6e 64 6c 65 2c |s",pixMa|pHandle,|
|00001000| 26 72 65 63 74 2c 26 70 | 61 67 65 52 65 63 74 2c |&rect,&p|ageRect,|
|00001010| 30 2e 30 2c 30 29 3b 0d | 09 09 41 70 70 65 6e 64 |0.0,0);.|..Append|
|00001020| 54 6f 46 69 6c 65 28 22 | 74 65 73 74 2e 70 73 22 |ToFile("|test.ps"|
|00001030| 2c 22 73 68 6f 77 70 61 | 67 65 5c 6e 22 29 3b 0d |,"showpa|ge\n");.|
|00001040| 0d 09 54 6f 20 70 72 69 | 6e 74 20 61 20 73 63 72 |..To pri|nt a scr|
|00001050| 65 65 6e 20 74 6f 20 64 | 69 73 6b 2c 20 70 72 65 |een to d|isk, pre|
|00001060| 73 65 72 76 69 6e 67 20 | 74 68 65 20 73 69 7a 65 |serving |the size|
|00001070| 20 61 6e 64 20 73 63 61 | 6c 65 20 6f 66 20 74 68 | and sca|le of th|
|00001080| 65 20 69 6d 61 67 65 2c | 0d 74 72 79 20 74 68 69 |e image,|.try thi|
|00001090| 73 3a 0d 0d 09 09 72 65 | 6d 6f 76 65 28 22 74 65 |s:....re|move("te|
|000010a0| 73 74 2e 70 73 22 29 3b | 0d 09 09 70 61 67 65 52 |st.ps");|...pageR|
|000010b0| 65 63 74 3d 77 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |ect=wind|ow->port|
|000010c0| 52 65 63 74 3b 0d 09 09 | 70 61 67 65 52 65 63 74 |Rect;...|pageRect|
|000010d0| 2e 74 6f 70 2a 3d 2d 31 | 3b 09 09 2f 2f 20 63 6f |.top*=-1|;..// co|
|000010e0| 6e 76 65 72 74 20 66 72 | 6f 6d 20 41 70 70 6c 65 |nvert fr|om Apple|
|000010f0| 20 74 6f 20 41 64 6f 62 | 65 20 63 6f 6f 72 64 69 | to Adob|e coordi|
|00001100| 6e 61 74 65 73 0d 09 09 | 70 61 67 65 52 65 63 74 |nates...|pageRect|
|00001110| 2e 62 6f 74 74 6f 6d 2a | 3d 2d 31 3b 09 2f 2f 20 |.bottom*|=-1;.// |
|00001120| 63 6f 6e 76 65 72 74 20 | 66 72 6f 6d 20 41 70 70 |convert |from App|
|00001130| 6c 65 20 74 6f 20 41 64 | 6f 62 65 20 63 6f 6f 72 |le to Ad|obe coor|
|00001140| 64 69 6e 61 74 65 73 0d | 09 09 53 65 74 52 65 63 |dinates.|..SetRec|
|00001150| 74 28 26 70 61 70 65 72 | 52 65 63 74 2c 30 2c 31 |t(&paper|Rect,0,1|
|00001160| 31 2a 37 32 2c 38 2e 35 | 2a 37 32 2c 30 29 3b 0d |1*72,8.5|*72,0);.|
|00001170| 09 09 43 65 6e 74 65 72 | 52 65 63 74 49 6e 52 65 |..Center|RectInRe|
|00001180| 63 74 28 26 70 61 67 65 | 52 65 63 74 2c 26 70 61 |ct(&page|Rect,&pa|
|00001190| 70 65 72 52 65 63 74 29 | 3b 0d 09 09 50 69 78 4d |perRect)|;...PixM|
|000011a0| 61 70 54 6f 50 6f 73 74 | 53 63 72 69 70 74 28 22 |apToPost|Script("|
|000011b0| 74 65 73 74 2e 70 73 22 | 2c 77 69 6e 64 6f 77 2d |test.ps"|,window-|
|000011c0| 3e 70 6f 72 74 50 69 78 | 4d 61 70 2c 26 77 69 6e |>portPix|Map,&win|
|000011d0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2c 26 70 |dow->por|tRect,&p|
|000011e0| 61 67 65 52 65 63 74 2c | 30 2c 30 29 3b 0d 09 09 |ageRect,|0,0);...|
|000011f0| 41 70 70 65 6e 64 54 6f | 46 69 6c 65 28 22 74 65 |AppendTo|File("te|
|00001200| 73 74 2e 70 73 22 2c 22 | 73 68 6f 77 70 61 67 65 |st.ps","|showpage|
|00001210| 5c 6e 22 29 3b 0d 0d 09 | 54 69 6c 69 6e 67 20 69 |\n");...|Tiling i|
|00001220| 73 20 73 6f 6d 65 74 68 | 69 6e 67 20 77 65 20 6f |s someth|ing we o|
|00001230| 66 74 65 6e 20 77 61 6e | 74 20 74 6f 20 64 6f 2c |ften wan|t to do,|
|00001240| 20 63 72 65 61 74 69 6e | 67 20 61 20 68 75 67 65 | creatin|g a huge|
|00001250| 20 69 6d 61 67 65 20 62 | 79 20 74 61 70 69 6e 67 | image b|y taping|
|00001260| 0d 6d 61 6e 79 20 70 61 | 67 65 73 20 74 6f 67 65 |.many pa|ges toge|
|00001270| 74 68 65 72 2e 20 59 6f | 75 20 61 63 63 6f 6d 70 |ther. Yo|u accomp|
|00001280| 6c 69 73 68 20 74 68 69 | 73 20 62 79 20 72 65 70 |lish thi|s by rep|
|00001290| 65 61 74 65 64 6c 79 20 | 70 72 69 6e 74 69 6e 67 |eatedly |printing|
|000012a0| 20 74 68 65 20 68 75 67 | 65 0d 69 6d 61 67 65 2d | the hug|e.image-|
|000012b0| 2d 6f 6e 6c 79 20 6f 6e | 65 20 70 61 67 65 66 75 |-only on|e pagefu|
|000012c0| 6c 20 61 70 70 65 61 72 | 73 20 65 61 63 68 20 74 |l appear|s each t|
|000012d0| 69 6d 65 2d 2d 73 68 69 | 66 74 69 6e 67 20 74 68 |ime--shi|fting th|
|000012e0| 65 20 69 6d 61 67 65 20 | 73 6f 20 74 68 61 74 20 |e image |so that |
|000012f0| 65 76 65 6e 74 75 61 6c | 6c 79 0d 65 76 65 72 79 |eventual|ly.every|
|00001300| 20 62 69 74 20 68 61 73 | 20 62 65 65 6e 20 70 72 | bit has| been pr|
|00001310| 69 6e 74 65 64 2e 20 28 | 49 74 27 73 20 73 6c 6f |inted. (|It's slo|
|00001320| 77 2c 20 73 69 6e 63 65 | 20 74 68 65 20 77 68 6f |w, since| the who|
|00001330| 6c 65 20 69 6d 61 67 65 | 20 69 73 0d 74 72 61 6e |le image| is.tran|
|00001340| 73 6d 69 74 74 65 64 20 | 74 6f 20 74 68 65 20 70 |smitted |to the p|
|00001350| 72 69 6e 74 65 72 20 65 | 61 63 68 20 74 69 6d 65 |rinter e|ach time|
|00001360| 2e 29 20 48 65 72 65 27 | 73 20 61 6e 20 65 78 61 |.) Here'|s an exa|
|00001370| 6d 70 6c 65 20 74 68 61 | 74 20 63 72 65 61 74 65 |mple tha|t create|
|00001380| 73 20 61 20 62 69 67 20 | 22 77 69 64 74 68 22 0d |s a big |"width".|
|00001390| 62 79 20 22 68 65 69 67 | 68 74 22 20 69 6d 61 67 |by "heig|ht" imag|
|000013a0| 65 2e 20 57 65 20 74 69 | 6c 65 20 6f 6e 74 6f 20 |e. We ti|le onto |
|000013b0| 6d 75 6c 74 69 70 6c 65 | 20 38 2e 35 22 78 31 31 |multiple| 8.5"x11|
|000013c0| 22 20 70 61 67 65 73 2c | 20 75 73 69 6e 67 20 37 |" pages,| using 7|
|000013d0| 2e 35 22 78 31 30 22 20 | 6f 66 20 65 61 63 68 0d |.5"x10" |of each.|
|000013e0| 70 61 67 65 2c 20 61 6c | 6c 6f 77 69 6e 67 20 66 |page, al|lowing f|
|000013f0| 6f 72 20 30 2e 35 22 20 | 6e 6f 6e 70 72 69 6e 74 |or 0.5" |nonprint|
|00001400| 69 6e 67 20 6d 61 72 67 | 69 6e 73 3a 0d 0d 09 09 |ing marg|ins:....|
|00001410| 72 65 6d 6f 76 65 28 22 | 74 65 73 74 2e 70 73 22 |remove("|test.ps"|
|00001420| 29 3b 0d 09 09 53 65 74 | 52 65 63 74 28 26 6d 6f |);...Set|Rect(&mo|
|00001430| 73 61 69 63 52 65 63 74 | 2c 30 2c 68 65 69 67 68 |saicRect|,0,heigh|
|00001440| 74 2c 77 69 64 74 68 2c | 30 29 3b 09 2f 2f 20 49 |t,width,|0);.// I|
|00001450| 6e 20 75 6e 69 74 73 20 | 6f 66 20 22 70 6f 69 6e |n units |of "poin|
|00001460| 74 73 22 2e 20 37 32 20 | 70 6f 69 6e 74 73 2f 69 |ts". 72 |points/i|
|00001470| 6e 63 68 2e 0d 09 09 4f | 66 66 73 65 74 52 65 63 |nch....O|ffsetRec|
|00001480| 74 28 26 6d 6f 73 61 69 | 63 52 65 63 74 2c 30 2e |t(&mosai|cRect,0.|
|00001490| 35 2a 37 32 2c 30 2e 35 | 2a 37 32 29 3b 09 2f 2f |5*72,0.5|*72);.//|
|000014a0| 20 61 6c 6c 6f 77 20 66 | 6f 72 20 6e 6f 6e 70 72 | allow f|or nonpr|
|000014b0| 69 6e 74 69 6e 67 20 6d | 61 72 67 69 6e 0d 09 09 |inting m|argin...|
|000014c0| 66 6f 72 28 69 3d 30 3b | 69 3c 77 69 64 74 68 3b |for(i=0;|i<width;|
|000014d0| 69 2b 3d 37 2e 35 2a 37 | 32 29 66 6f 72 28 6a 3d |i+=7.5*7|2)for(j=|
|000014e0| 30 3b 6a 3c 68 65 69 67 | 68 74 3b 6a 2b 3d 31 30 |0;j<heig|ht;j+=10|
|000014f0| 2a 37 32 29 7b 0d 09 09 | 09 70 61 67 65 52 65 63 |*72){...|.pageRec|
|00001500| 74 3d 6d 6f 73 61 69 63 | 52 65 63 74 3b 0d 09 09 |t=mosaic|Rect;...|
|00001510| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 70 61 67 |.OffsetR|ect(&pag|
|00001520| 65 52 65 63 74 2c 2d 69 | 2c 2d 6a 29 3b 0d 09 09 |eRect,-i|,-j);...|
|00001530| 09 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |.PixMapT|oPostScr|
|00001540| 69 70 74 28 22 74 65 73 | 74 2e 70 73 22 2c 70 69 |ipt("tes|t.ps",pi|
|00001550| 78 4d 61 70 48 61 6e 64 | 6c 65 2c 26 72 65 63 74 |xMapHand|le,&rect|
|00001560| 2c 26 70 61 67 65 52 65 | 63 74 2c 30 2e 30 2c 30 |,&pageRe|ct,0.0,0|
|00001570| 29 3b 0d 09 09 09 41 70 | 70 65 6e 64 54 6f 46 69 |);....Ap|pendToFi|
|00001580| 6c 65 28 22 74 65 73 74 | 2e 70 73 22 2c 22 73 68 |le("test|.ps","sh|
|00001590| 6f 77 70 61 67 65 5c 6e | 22 29 3b 0d 09 09 7d 0d |owpage\n|");...}.|
|000015a0| 0d 09 49 6e 20 63 61 73 | 65 20 79 6f 75 72 20 50 |..In cas|e your P|
|000015b0| 6f 73 74 53 63 72 69 70 | 74 20 6d 61 6e 75 61 6c |ostScrip|t manual|
|000015c0| 20 69 73 6e 27 74 20 68 | 61 6e 64 79 2c 20 74 68 | isn't h|andy, th|
|000015d0| 65 20 65 61 73 79 20 77 | 61 79 20 74 6f 20 6f 62 |e easy w|ay to ob|
|000015e0| 74 61 69 6e 0d 6d 75 6c | 74 69 70 6c 65 20 63 6f |tain.mul|tiple co|
|000015f0| 70 69 65 73 20 6f 66 20 | 65 61 63 68 20 70 61 67 |pies of |each pag|
|00001600| 65 20 69 73 20 74 6f 20 | 75 73 65 20 74 68 65 20 |e is to |use the |
|00001610| 23 63 6f 70 69 65 73 20 | 76 61 72 69 61 62 6c 65 |#copies |variable|
|00001620| 20 74 68 61 74 27 73 20 | 62 75 69 6c 74 20 69 6e | that's |built in|
|00001630| 74 6f 0d 50 6f 73 74 73 | 63 72 69 70 74 2e 20 41 |to.Posts|cript. A|
|00001640| 6e 79 77 68 65 72 65 20 | 69 6e 20 79 6f 75 72 20 |nywhere |in your |
|00001650| 66 69 6c 65 20 62 65 66 | 6f 72 65 20 22 73 68 6f |file bef|ore "sho|
|00001660| 77 70 61 67 65 22 2c 20 | 73 65 74 20 23 63 6f 70 |wpage", |set #cop|
|00001670| 69 65 73 20 74 6f 20 74 | 68 65 20 64 65 73 69 72 |ies to t|he desir|
|00001680| 65 64 0d 76 61 6c 75 65 | 2e 20 45 2e 67 2e 0d 0d |ed.value|. E.g...|
|00001690| 09 09 41 70 70 65 6e 64 | 54 6f 46 69 6c 65 28 22 |..Append|ToFile("|
|000016a0| 74 65 73 74 2e 70 73 22 | 2c 22 2f 23 63 6f 70 69 |test.ps"|,"/#copi|
|000016b0| 65 73 20 33 20 64 65 66 | 5c 6e 22 29 3b 0d 09 09 |es 3 def|\n");...|
|000016c0| 0d 09 54 68 65 72 65 20 | 61 72 65 20 6d 61 6e 79 |..There |are many|
|000016d0| 20 66 72 65 65 20 50 6f | 73 74 53 63 72 69 70 74 | free Po|stScript|
|000016e0| 20 64 6f 77 6e 6c 6f 61 | 64 65 72 73 2c 20 62 75 | downloa|ders, bu|
|000016f0| 74 20 49 20 66 69 6e 64 | 20 74 68 65 6d 20 63 6c |t I find| them cl|
|00001700| 75 6d 73 79 20 74 6f 0d | 75 73 65 2c 20 65 73 70 |umsy to.|use, esp|
|00001710| 65 63 69 61 6c 6c 79 20 | 74 68 65 20 6f 6e 65 73 |ecially |the ones|
|00001720| 20 74 68 61 74 20 64 6f | 6e 27 74 20 69 6e 66 6f | that do|n't info|
|00001730| 72 6d 20 79 6f 75 20 6f | 66 20 65 72 72 6f 72 73 |rm you o|f errors|
|00001740| 2c 20 73 68 6f 75 6c 64 | 20 74 68 65 79 20 6f 63 |, should| they oc|
|00001750| 63 75 72 2e 20 49 0d 62 | 6f 75 67 68 74 20 61 6e |cur. I.b|ought an|
|00001760| 64 20 75 73 65 0d 50 6f | 73 74 48 61 73 74 65 0d |d use.Po|stHaste.|
|00001770| 66 72 6f 6d 3a 0d 4d 69 | 63 72 6f 20 44 79 6e 61 |from:.Mi|cro Dyna|
|00001780| 6d 69 63 73 2c 20 4c 74 | 64 2e 0d 38 35 35 35 20 |mics, Lt|d..8555 |
|00001790| 31 36 74 68 20 53 74 2e | 2c 20 53 75 69 74 65 20 |16th St.|, Suite |
|000017a0| 38 30 32 0d 53 69 6c 76 | 65 72 20 53 70 72 69 6e |802.Silv|er Sprin|
|000017b0| 67 2c 20 4d 44 20 32 30 | 39 31 30 0d 28 33 30 31 |g, MD 20|910.(301|
|000017c0| 29 2d 35 38 39 2d 36 33 | 30 30 0d 61 6e 64 0d 4c |)-589-63|00.and.L|
|000017d0| 61 73 65 72 53 74 61 74 | 75 73 2c 20 61 20 64 65 |aserStat|us, a de|
|000017e0| 73 6b 20 61 63 63 65 73 | 73 6f 72 79 20 69 6e 63 |sk acces|sory inc|
|000017f0| 6c 75 64 65 64 20 69 6e | 20 74 68 65 20 0d 4d 6f |luded in| the .Mo|
|00001800| 63 6b 50 61 63 6b 61 67 | 65 20 50 6c 75 73 20 55 |ckPackag|e Plus U|
|00001810| 74 69 6c 69 74 69 65 73 | 0d 66 72 6f 6d 3a 0d 43 |tilities|.from:.C|
|00001820| 45 20 53 6f 66 74 77 61 | 72 65 0d 31 38 35 34 20 |E Softwa|re.1854 |
|00001830| 46 75 6c 6c 65 72 20 52 | 6f 61 64 0d 50 4f 20 42 |Fuller R|oad.PO B|
|00001840| 6f 78 20 36 35 35 38 30 | 0d 57 65 73 74 20 44 65 |ox 65580|.West De|
|00001850| 73 20 4d 6f 69 6e 65 73 | 2c 20 49 6f 77 61 20 35 |s Moines|, Iowa 5|
|00001860| 30 32 36 35 0d 28 35 31 | 35 29 2d 32 32 34 2d 31 |0265.(51|5)-224-1|
|00001870| 39 39 35 0d 0d 59 6f 75 | 20 6d 61 79 20 61 6c 73 |995..You| may als|
|00001880| 6f 20 77 61 6e 74 20 74 | 6f 20 72 65 61 64 3a 0d |o want t|o read:.|
|00001890| 0d 41 64 6f 62 65 20 53 | 79 73 74 65 6d 73 20 28 |.Adobe S|ystems (|
|000018a0| 31 39 38 35 29 20 50 6f | 73 74 53 63 72 69 70 74 |1985) Po|stScript|
|000018b0| 20 4c 61 6e 67 75 61 67 | 65 20 52 65 66 65 72 65 | Languag|e Refere|
|000018c0| 6e 63 65 20 4d 61 6e 75 | 61 6c 2c 20 53 65 63 6f |nce Manu|al, Seco|
|000018d0| 6e 64 20 45 64 69 74 69 | 6f 6e 2e 20 0d 52 65 61 |nd Editi|on. .Rea|
|000018e0| 64 69 6e 67 2c 20 4d 41 | 3a 20 41 64 64 69 73 6f |ding, MA|: Addiso|
|000018f0| 6e 2d 57 65 73 6c 65 79 | 2e 0d 0d 50 65 6c 6c 69 |n-Wesley|...Pelli|
|00001900| 2c 20 44 2e 20 47 2e 20 | 28 31 39 38 37 29 20 50 |, D. G. |(1987) P|
|00001910| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 69 6e 20 50 6f |rogrammi|ng in Po|
|00001920| 73 74 53 63 72 69 70 74 | 3a 20 49 6d 61 67 69 6e |stScript|: Imagin|
|00001930| 67 20 6f 6e 20 70 61 70 | 65 72 20 66 72 6f 6d 20 |g on pap|er from |
|00001940| 61 20 6d 61 74 68 65 6d | 61 74 69 63 61 6c 0d 64 |a mathem|atical.d|
|00001950| 65 73 63 72 69 70 74 69 | 6f 6e 2e 20 42 59 54 45 |escripti|on. BYTE|
|00001960| 2c 20 31 32 20 28 35 29 | 2c 20 31 38 35 2d 32 30 |, 12 (5)|, 185-20|
|00001970| 32 2e 0d 0d 48 49 53 54 | 4f 52 59 3a 0d 34 2f 32 |2...HIST|ORY:.4/2|
|00001980| 31 2f 39 31 09 64 67 70 | 09 77 72 6f 74 65 20 69 |1/91.dgp|.wrote i|
|00001990| 74 0d 37 2f 32 34 2f 39 | 31 20 64 67 70 20 61 64 |t.7/24/9|1 dgp ad|
|000019a0| 64 65 64 20 63 6f 6d 6d | 65 6e 74 20 61 62 6f 75 |ded comm|ent abou|
|000019b0| 74 20 73 68 69 66 74 69 | 6e 67 20 70 61 67 65 52 |t shifti|ng pageR|
|000019c0| 65 63 74 0d 38 2f 32 34 | 2f 39 31 09 64 67 70 09 |ect.8/24|/91.dgp.|
|000019d0| 4d 61 64 65 20 63 6f 6d | 70 61 74 69 62 6c 65 20 |Made com|patible |
|000019e0| 77 69 74 68 20 54 48 49 | 4e 4b 20 43 20 35 2e 30 |with THI|NK C 5.0|
|000019f0| 0d 31 32 2f 37 2f 39 31 | 09 64 67 70 09 6d 69 6e |.12/7/91|.dgp.min|
|00001a00| 6f 72 20 65 64 69 74 69 | 6e 67 20 6f 66 20 63 6f |or editi|ng of co|
|00001a10| 6d 6d 65 6e 74 73 0d 31 | 30 2f 31 30 2f 39 32 20 |mments.1|0/10/92 |
|00001a20| 64 67 70 20 41 64 64 65 | 64 20 73 75 70 70 6f 72 |dgp Adde|d suppor|
|00001a30| 74 20 66 6f 72 20 50 69 | 78 6d 61 70 27 73 20 74 |t for Pi|xmap's t|
|00001a40| 68 61 74 20 72 65 71 75 | 69 72 65 20 33 32 2d 62 |hat requ|ire 32-b|
|00001a50| 69 74 20 61 64 64 72 65 | 73 73 69 6e 67 2e 0d 09 |it addre|ssing...|
|00001a60| 09 09 4d 75 63 68 20 66 | 61 73 74 65 72 20 6e 6f |..Much f|aster no|
|00001a70| 77 2c 20 75 73 69 6e 67 | 20 74 61 62 6c 65 2d 6c |w, using| table-l|
|00001a80| 6f 6f 6b 75 70 20 69 6e | 73 74 65 61 64 20 6f 66 |ookup in|stead of|
|00001a90| 20 73 70 72 69 6e 74 66 | 20 66 6f 72 20 0d 09 09 | sprintf| for ...|
|00001aa0| 09 74 68 65 20 68 65 78 | 20 65 6e 63 6f 64 69 6e |.the hex| encodin|
|00001ab0| 67 2e 0d 09 09 09 44 65 | 6c 65 74 65 64 20 6f 62 |g.....De|leted ob|
|00001ac0| 73 6f 6c 65 74 65 20 73 | 75 70 70 6f 72 74 20 66 |solete s|upport f|
|00001ad0| 6f 72 20 54 48 49 4e 4b | 20 43 20 34 2e 0d 34 2f |or THINK| C 4..4/|
|00001ae0| 32 39 2f 39 33 09 64 67 | 70 09 26 20 6a 61 73 20 |29/93.dg|p.& jas |
|00001af0| 41 64 64 65 64 20 65 78 | 70 6c 61 6e 61 74 69 6f |Added ex|planatio|
|00001b00| 6e 20 6f 66 20 68 6f 77 | 20 74 6f 20 64 6f 20 74 |n of how| to do t|
|00001b10| 69 6c 69 6e 67 2e 0d 35 | 2f 32 37 2f 39 33 09 64 |iling..5|/27/93.d|
|00001b20| 67 70 09 6d 69 6e 6f 72 | 20 65 64 69 74 69 6e 67 |gp.minor| editing|
|00001b30| 20 66 6f 72 20 73 70 65 | 65 64 20 61 6e 64 20 63 | for spe|ed and c|
|00001b40| 6c 61 72 69 74 79 0d 36 | 2f 31 35 2f 39 33 09 64 |larity.6|/15/93.d|
|00001b50| 67 70 09 46 69 78 65 64 | 20 73 69 6c 6c 79 20 62 |gp.Fixed| silly b|
|00001b60| 75 67 20 69 6e 74 72 6f | 64 75 63 65 64 20 35 2f |ug intro|duced 5/|
|00001b70| 32 37 2f 39 33 20 74 68 | 61 74 20 73 75 70 70 72 |27/93 th|at suppr|
|00001b80| 65 73 73 65 64 20 61 6c | 6c 20 68 65 78 20 64 61 |essed al|l hex da|
|00001b90| 74 61 2e 0d 09 09 09 43 | 61 6c 6c 20 53 74 72 69 |ta.....C|all Stri|
|00001ba0| 70 41 64 64 72 65 73 73 | 2e 0d 36 2f 32 39 2f 39 |pAddress|..6/29/9|
|00001bb0| 33 09 64 67 70 09 43 68 | 61 6e 67 65 64 20 63 61 |3.dgp.Ch|anged ca|
|00001bc0| 6c 6c 20 69 6e 74 65 72 | 66 61 63 65 20 74 6f 20 |ll inter|face to |
|00001bd0| 61 63 63 65 70 74 20 61 | 20 70 69 78 6d 61 70 20 |accept a| pixmap |
|00001be0| 68 61 6e 64 6c 65 20 69 | 6e 73 74 65 61 64 20 6f |handle i|nstead o|
|00001bf0| 66 20 61 20 70 6f 69 6e | 74 65 72 2e 0d 09 09 09 |f a poin|ter.....|
|00001c00| 54 68 65 20 70 72 6f 62 | 6c 65 6d 20 77 69 74 68 |The prob|lem with|
|00001c10| 20 61 63 63 65 70 74 69 | 6e 67 20 61 20 70 6f 69 | accepti|ng a poi|
|00001c20| 6e 74 65 72 20 69 73 20 | 74 68 61 74 20 74 68 65 |nter is |that the|
|00001c30| 20 75 73 65 72 20 6d 75 | 73 74 20 72 65 6d 65 6d | user mu|st remem|
|00001c40| 62 65 72 0d 09 09 09 74 | 6f 20 6c 6f 63 6b 20 74 |ber....t|o lock t|
|00001c50| 68 65 20 68 61 6e 64 6c | 65 20 62 65 66 6f 72 65 |he handl|e before|
|00001c60| 20 64 65 72 65 66 65 72 | 65 6e 63 69 6e 67 20 69 | derefer|encing i|
|00001c70| 74 20 74 6f 20 67 65 74 | 20 74 68 65 20 70 6f 69 |t to get| the poi|
|00001c80| 6e 74 65 72 2c 20 61 6e | 64 0d 09 09 09 6c 6f 74 |nter, an|d....lot|
|00001c90| 73 20 6f 66 20 70 65 6f | 70 6c 65 20 66 6f 72 67 |s of peo|ple forg|
|00001ca0| 65 74 2c 20 6c 65 61 64 | 69 6e 67 20 74 6f 20 61 |et, lead|ing to a|
|00001cb0| 20 6d 79 73 74 65 72 69 | 6f 75 73 20 63 72 61 73 | mysteri|ous cras|
|00001cc0| 68 2e 20 4e 6f 77 20 74 | 68 65 20 6c 6f 63 6b 69 |h. Now t|he locki|
|00001cd0| 6e 67 0d 09 09 09 69 73 | 20 68 61 6e 64 6c 65 64 |ng....is| handled|
|00001ce0| 20 69 6e 74 65 72 6e 61 | 6c 6c 79 2c 20 61 75 74 | interna|lly, aut|
|00001cf0| 6f 6d 61 74 69 63 61 6c | 6c 79 2e 0d 36 2f 33 30 |omatical|ly..6/30|
|00001d00| 2f 39 33 09 64 67 70 09 | 41 64 64 65 64 20 65 78 |/93.dgp.|Added ex|
|00001d10| 61 6d 70 6c 65 2c 20 61 | 62 6f 76 65 2c 20 73 68 |ample, a|bove, sh|
|00001d20| 6f 77 69 6e 67 20 68 6f | 77 20 74 6f 20 70 72 69 |owing ho|w to pri|
|00001d30| 6e 74 20 73 63 72 65 65 | 6e 20 74 6f 20 64 69 73 |nt scree|n to dis|
|00001d40| 6b 2e 0d 37 2f 39 2f 39 | 33 09 64 67 70 20 63 68 |k..7/9/9|3.dgp ch|
|00001d50| 65 63 6b 20 66 6f 72 20 | 33 32 2d 62 69 74 20 61 |eck for |32-bit a|
|00001d60| 64 64 72 65 73 73 69 6e | 67 20 63 61 70 61 62 69 |ddressin|g capabi|
|00001d70| 6c 69 74 79 2e 0d 31 32 | 2f 31 35 2f 39 33 20 64 |lity..12|/15/93 d|
|00001d80| 67 70 20 61 64 64 65 64 | 20 66 69 6c 65 6e 61 6d |gp added| filenam|
|00001d90| 65 20 61 72 67 75 6d 65 | 6e 74 20 74 6f 20 74 68 |e argume|nt to th|
|00001da0| 65 20 64 69 61 67 6e 6f | 73 74 69 63 20 6d 65 73 |e diagno|stic mes|
|00001db0| 73 61 67 65 73 2e 0d 09 | 09 09 43 6f 72 72 65 63 |sages...|..Correc|
|00001dc0| 74 65 64 20 67 72 61 79 | 4c 65 76 65 6c 73 20 74 |ted gray|Levels t|
|00001dd0| 6f 20 67 72 61 79 4c 65 | 76 65 6c 73 2d 31 20 69 |o grayLe|vels-1 i|
|00001de0| 6e 20 63 6f 6d 70 75 74 | 69 6e 67 0d 09 09 09 74 |n comput|ing....t|
|00001df0| 68 65 20 72 65 71 75 69 | 72 65 64 20 6e 75 6d 62 |he requi|red numb|
|00001e00| 65 72 20 6f 66 20 70 69 | 78 65 6c 73 20 69 6e 20 |er of pi|xels in |
|00001e10| 74 68 65 20 68 61 6c 66 | 74 6f 6e 65 20 63 65 6c |the half|tone cel|
|00001e20| 6c 2e 0d 36 2f 31 38 2f | 39 34 09 64 67 70 09 63 |l..6/18/|94.dgp.c|
|00001e30| 61 6e 33 32 20 69 73 20 | 6e 6f 77 20 63 6f 6d 70 |an32 is |now comp|
|00001e40| 75 74 65 64 20 62 79 20 | 63 61 6c 6c 69 6e 67 20 |uted by |calling |
|00001e50| 54 72 61 70 41 76 61 69 | 6c 61 62 6c 65 28 5f 53 |TrapAvai|lable(_S|
|00001e60| 77 61 70 4d 4d 55 4d 6f | 64 65 29 2c 20 77 68 69 |wapMMUMo|de), whi|
|00001e70| 63 68 20 0d 09 09 09 72 | 65 74 75 72 6e 73 20 74 |ch ....r|eturns t|
|00001e80| 68 65 20 63 6f 72 72 65 | 63 74 20 61 6e 73 77 65 |he corre|ct answe|
|00001e90| 72 20 65 76 65 6e 20 6f | 6e 20 4d 61 63 73 20 77 |r even o|n Macs w|
|00001ea0| 69 74 68 20 64 69 72 74 | 79 20 52 4f 4d 73 2e 0d |ith dirt|y ROMs..|
|00001eb0| 39 2f 35 2f 39 34 20 64 | 67 70 20 72 65 6d 6f 76 |9/5/94 d|gp remov|
|00001ec0| 65 64 20 61 73 73 75 6d | 70 74 69 6f 6e 20 69 6e |ed assum|ption in|
|00001ed0| 20 70 72 69 6e 74 66 27 | 73 20 74 68 61 74 20 69 | printf'|s that i|
|00001ee0| 6e 74 3d 3d 73 68 6f 72 | 74 2e 0d 2a 2f 0d 23 69 |nt==shor|t..*/.#i|
|00001ef0| 6e 63 6c 75 64 65 20 22 | 56 69 64 65 6f 54 6f 6f |nclude "|VideoToo|
|00001f00| 6c 62 6f 78 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |lbox.h".|#include|
|00001f10| 20 3c 61 73 73 65 72 74 | 2e 68 3e 0d 23 69 6e 63 | <assert|.h>.#inc|
|00001f20| 6c 75 64 65 20 3c 6d 61 | 74 68 2e 68 3e 0d 23 69 |lude <ma|th.h>.#i|
|00001f30| 6e 63 6c 75 64 65 20 3c | 54 72 61 70 73 2e 68 3e |nclude <|Traps.h>|
|00001f40| 09 2f 2f 20 5f 53 77 61 | 70 4d 4d 55 4d 6f 64 65 |.// _Swa|pMMUMode|
|00001f50| 0d 23 64 65 66 69 6e 65 | 20 43 52 45 41 54 4f 52 |.#define| CREATOR|
|00001f60| 20 27 34 50 53 55 27 09 | 2f 2a 20 69 64 65 6e 74 | '4PSU'.|/* ident|
|00001f70| 69 66 69 65 73 20 74 68 | 65 20 70 6f 73 74 73 63 |ifies th|e postsc|
|00001f80| 72 69 70 74 20 66 69 6c | 65 20 61 73 20 61 20 50 |ript fil|e as a P|
|00001f90| 6f 73 74 48 61 73 74 65 | 20 64 6f 63 75 6d 65 6e |ostHaste| documen|
|00001fa0| 74 20 2a 2f 0d 0d 76 6f | 69 64 20 50 69 78 4d 61 |t */..vo|id PixMa|
|00001fb0| 70 54 6f 50 6f 73 74 53 | 63 72 69 70 74 28 63 68 |pToPostS|cript(ch|
|00001fc0| 61 72 20 2a 66 69 6c 65 | 6e 61 6d 65 2c 50 69 78 |ar *file|name,Pix|
|00001fd0| 4d 61 70 20 2a 2a 70 6d | 2c 52 65 63 74 20 2a 72 |Map **pm|,Rect *r|
|00001fe0| 65 63 74 50 74 72 0d 09 | 2c 52 65 63 74 20 2a 70 |ectPtr..|,Rect *p|
|00001ff0| 61 67 65 52 65 63 74 50 | 74 72 2c 64 6f 75 62 6c |ageRectP|tr,doubl|
|00002000| 65 20 63 65 6c 6c 73 50 | 65 72 49 6e 63 68 2c 69 |e cellsP|erInch,i|
|00002010| 6e 74 20 67 72 61 79 4c | 65 76 65 6c 73 29 0d 7b |nt grayL|evels).{|
|00002020| 0d 09 46 49 4c 45 20 2a | 66 69 6c 65 3b 0d 09 75 |..FILE *|file;..u|
|00002030| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 61 64 |nsigned |char *ad|
|00002040| 64 72 3b 0d 09 6c 6f 6e | 67 20 79 2c 62 79 74 65 |dr;..lon|g y,byte|
|00002050| 73 2c 77 69 64 74 68 3b | 0d 09 72 65 67 69 73 74 |s,width;|..regist|
|00002060| 65 72 20 6c 6f 6e 67 20 | 69 3b 0d 09 75 6e 73 69 |er long |i;..unsi|
|00002070| 67 6e 65 64 20 73 68 6f | 72 74 20 2a 62 75 66 66 |gned sho|rt *buff|
|00002080| 65 72 2c 2a 62 75 66 66 | 65 72 33 32 3b 0d 09 72 |er,*buff|er32;..r|
|00002090| 65 67 69 73 74 65 72 20 | 75 6e 73 69 67 6e 65 64 |egister |unsigned|
|000020a0| 20 73 68 6f 72 74 20 2a | 77 6f 72 64 2c 68 65 78 | short *|word,hex|
|000020b0| 5b 32 35 36 5d 3b 0d 09 | 72 65 67 69 73 74 65 72 |[256];..|register|
|000020c0| 20 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 2a | unsigne|d char *|
|000020d0| 62 79 74 65 3b 0d 09 73 | 68 6f 72 74 20 70 69 78 |byte;..s|hort pix|
|000020e0| 65 6c 53 69 7a 65 3b 0d | 09 73 68 6f 72 74 20 72 |elSize;.|.short r|
|000020f0| 6f 77 42 79 74 65 73 3b | 0d 09 74 69 6d 65 5f 74 |owBytes;|..time_t|
|00002100| 20 41 4e 53 49 54 69 6d | 65 3b 0d 09 63 68 61 72 | ANSITim|e;..char|
|00002110| 20 73 74 72 69 6e 67 5b | 31 30 30 5d 3b 0d 09 63 | string[|100];..c|
|00002120| 68 61 72 20 6d 6f 64 65 | 2c 70 6d 53 74 61 74 65 |har mode|,pmState|
|00002130| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 20 63 61 6e 33 32 |;..Boole|an can32|
|00002140| 3b 0d 0d 09 61 73 73 65 | 72 74 28 53 74 61 63 6b |;...asse|rt(Stack|
|00002150| 53 70 61 63 65 28 29 3e | 35 30 30 30 29 3b 0d 09 |Space()>|5000);..|
|00002160| 63 61 6e 33 32 3d 54 72 | 61 70 41 76 61 69 6c 61 |can32=Tr|apAvaila|
|00002170| 62 6c 65 28 5f 53 77 61 | 70 4d 4d 55 4d 6f 64 65 |ble(_Swa|pMMUMode|
|00002180| 29 3b 0d 09 69 66 28 63 | 65 6c 6c 73 50 65 72 49 |);..if(c|ellsPerI|
|00002190| 6e 63 68 21 3d 30 2e 30 | 20 26 26 20 67 72 61 79 |nch!=0.0| && gray|
|000021a0| 4c 65 76 65 6c 73 21 3d | 30 2e 30 29 50 72 69 6e |Levels!=|0.0)Prin|
|000021b0| 74 66 45 78 69 74 28 22 | 50 69 78 4d 61 70 54 6f |tfExit("|PixMapTo|
|000021c0| 50 6f 73 74 53 63 72 69 | 70 74 28 25 73 29 3a 20 |PostScri|pt(%s): |
|000021d0| 22 0d 09 09 22 79 6f 75 | 20 6d 61 79 20 6e 6f 74 |"..."you| may not|
|000021e0| 20 73 70 65 63 69 66 79 | 20 42 4f 54 48 20 63 65 | specify| BOTH ce|
|000021f0| 6c 6c 73 50 65 72 49 6e | 63 68 20 26 20 67 72 61 |llsPerIn|ch & gra|
|00002200| 79 4c 65 76 65 6c 73 2e | 5c 6e 22 0d 09 09 22 53 |yLevels.|\n"..."S|
|00002210| 65 74 20 6f 6e 65 20 74 | 6f 20 7a 65 72 6f 2e 5c |et one t|o zero.\|
|00002220| 6e 22 2c 66 69 6c 65 6e | 61 6d 65 29 3b 0d 09 66 |n",filen|ame);..f|
|00002230| 69 6c 65 3d 66 6f 70 65 | 6e 28 66 69 6c 65 6e 61 |ile=fope|n(filena|
|00002240| 6d 65 2c 22 61 22 29 3b | 0d 09 69 66 28 66 69 6c |me,"a");|..if(fil|
|00002250| 65 3d 3d 4e 55 4c 4c 29 | 50 72 69 6e 74 66 45 78 |e==NULL)|PrintfEx|
|00002260| 69 74 28 22 50 69 78 4d | 61 70 54 6f 50 6f 73 74 |it("PixM|apToPost|
|00002270| 53 63 72 69 70 74 3a 20 | 45 72 72 6f 72 20 69 6e |Script: |Error in|
|00002280| 20 6f 70 65 6e 69 6e 67 | 20 66 69 6c 65 20 d2 25 | opening| file .%|
|00002290| 73 d3 2e 5c 6e 22 0d 09 | 09 2c 66 69 6c 65 6e 61 |s..\n"..|.,filena|
|000022a0| 6d 65 29 3b 0d 09 70 6d | 53 74 61 74 65 3d 48 47 |me);..pm|State=HG|
|000022b0| 65 74 53 74 61 74 65 28 | 28 48 61 6e 64 6c 65 29 |etState(|(Handle)|
|000022c0| 70 6d 29 3b 0d 09 48 4c | 6f 63 6b 28 28 48 61 6e |pm);..HL|ock((Han|
|000022d0| 64 6c 65 29 70 6d 29 3b | 0d 09 61 64 64 72 3d 52 |dle)pm);|..addr=R|
|000022e0| 65 63 74 54 6f 41 64 64 | 72 65 73 73 28 2a 70 6d |ectToAdd|ress(*pm|
|000022f0| 2c 72 65 63 74 50 74 72 | 2c 26 72 6f 77 42 79 74 |,rectPtr|,&rowByt|
|00002300| 65 73 2c 26 70 69 78 65 | 6c 53 69 7a 65 2c 4e 55 |es,&pixe|lSize,NU|
|00002310| 4c 4c 29 3b 0d 09 69 66 | 28 61 64 64 72 3d 3d 4e |LL);..if|(addr==N|
|00002320| 55 4c 4c 29 50 72 69 6e | 74 66 45 78 69 74 28 22 |ULL)Prin|tfExit("|
|00002330| 50 69 78 4d 61 70 54 6f | 50 6f 73 74 53 63 72 69 |PixMapTo|PostScri|
|00002340| 70 74 28 25 73 29 3a 20 | 42 61 64 20 50 69 78 4d |pt(%s): |Bad PixM|
|00002350| 61 70 2e 5c 6e 22 2c 66 | 69 6c 65 6e 61 6d 65 29 |ap.\n",f|ilename)|
|00002360| 3b 0d 09 69 66 28 70 69 | 78 65 6c 53 69 7a 65 21 |;..if(pi|xelSize!|
|00002370| 3d 38 29 50 72 69 6e 74 | 66 45 78 69 74 28 22 50 |=8)Print|fExit("P|
|00002380| 69 78 4d 61 70 54 6f 50 | 6f 73 74 53 63 72 69 70 |ixMapToP|ostScrip|
|00002390| 74 28 25 73 29 3a 20 22 | 0d 09 09 22 53 6f 72 72 |t(%s): "|..."Sorr|
|000023a0| 79 2c 20 70 69 78 65 6c | 53 69 7a 65 20 6d 75 73 |y, pixel|Size mus|
|000023b0| 74 20 62 65 20 38 2c 20 | 6e 6f 74 20 25 64 2e 5c |t be 8, |not %d.\|
|000023c0| 6e 22 2c 66 69 6c 65 6e | 61 6d 65 2c 28 69 6e 74 |n",filen|ame,(int|
|000023d0| 29 70 69 78 65 6c 53 69 | 7a 65 29 3b 0d 09 74 69 |)pixelSi|ze);..ti|
|000023e0| 6d 65 28 26 41 4e 53 49 | 54 69 6d 65 29 3b 0d 09 |me(&ANSI|Time);..|
|000023f0| 73 74 72 66 74 69 6d 65 | 28 73 74 72 69 6e 67 2c |strftime|(string,|
|00002400| 73 69 7a 65 6f 66 28 73 | 74 72 69 6e 67 29 2c 22 |sizeof(s|tring),"|
|00002410| 25 49 3a 25 4d 20 25 70 | 20 25 41 2c 20 25 42 20 |%I:%M %p| %A, %B |
|00002420| 25 64 2c 20 25 59 22 2c | 6c 6f 63 61 6c 74 69 6d |%d, %Y",|localtim|
|00002430| 65 28 26 41 4e 53 49 54 | 69 6d 65 29 29 3b 0d 09 |e(&ANSIT|ime));..|
|00002440| 66 70 72 69 6e 74 66 28 | 66 69 6c 65 2c 0d 09 09 |fprintf(|file,...|
|00002450| 22 5c 6e 73 61 76 65 09 | 09 09 09 09 25 25 20 25 |"\nsave.|....%% %|
|00002460| 73 2c 20 25 73 5c 6e 22 | 2c 66 69 6c 65 6e 61 6d |s, %s\n"|,filenam|
|00002470| 65 2c 73 74 72 69 6e 67 | 29 3b 0d 09 66 70 72 69 |e,string|);..fpri|
|00002480| 6e 74 66 28 66 69 6c 65 | 2c 0d 09 09 22 2f 6e 78 |ntf(file|,..."/nx|
|00002490| 20 25 64 20 64 65 66 09 | 09 09 09 25 25 20 70 69 | %d def.|...%% pi|
|000024a0| 78 65 6c 73 20 70 65 72 | 20 72 61 73 74 65 72 20 |xels per| raster |
|000024b0| 6c 69 6e 65 5c 6e 22 2c | 28 69 6e 74 29 28 72 65 |line\n",|(int)(re|
|000024c0| 63 74 50 74 72 2d 3e 72 | 69 67 68 74 2d 72 65 63 |ctPtr->r|ight-rec|
|000024d0| 74 50 74 72 2d 3e 6c 65 | 66 74 29 29 3b 0d 09 66 |tPtr->le|ft));..f|
|000024e0| 70 72 69 6e 74 66 28 66 | 69 6c 65 2c 0d 09 09 22 |printf(f|ile,..."|
|000024f0| 2f 6e 79 20 25 64 20 64 | 65 66 09 09 09 09 25 25 |/ny %d d|ef....%%|
|00002500| 20 6c 69 6e 65 73 20 69 | 6e 20 69 6d 61 67 65 5c | lines i|n image\|
|00002510| 6e 22 2c 28 69 6e 74 29 | 28 72 65 63 74 50 74 72 |n",(int)|(rectPtr|
|00002520| 2d 3e 62 6f 74 74 6f 6d | 2d 72 65 63 74 50 74 72 |->bottom|-rectPtr|
|00002530| 2d 3e 74 6f 70 29 29 3b | 0d 09 66 70 72 69 6e 74 |->top));|..fprint|
|00002540| 66 28 66 69 6c 65 2c 0d | 09 09 22 25 64 20 25 64 |f(file,.|.."%d %d|
|00002550| 20 74 72 61 6e 73 6c 61 | 74 65 09 09 09 25 25 20 | transla|te...%% |
|00002560| 6c 6f 63 61 74 65 20 6c | 6f 77 65 72 20 6c 65 66 |locate l|ower lef|
|00002570| 74 20 6f 66 20 69 6d 61 | 67 65 5c 6e 22 0d 09 09 |t of ima|ge\n"...|
|00002580| 2c 28 69 6e 74 29 70 61 | 67 65 52 65 63 74 50 74 |,(int)pa|geRectPt|
|00002590| 72 2d 3e 6c 65 66 74 2c | 28 69 6e 74 29 70 61 67 |r->left,|(int)pag|
|000025a0| 65 52 65 63 74 50 74 72 | 2d 3e 62 6f 74 74 6f 6d |eRectPtr|->bottom|
|000025b0| 29 3b 0d 09 66 70 72 69 | 6e 74 66 28 66 69 6c 65 |);..fpri|ntf(file|
|000025c0| 2c 0d 09 09 22 25 64 20 | 25 64 20 73 63 61 6c 65 |,..."%d |%d scale|
|000025d0| 09 09 09 25 25 20 70 72 | 69 6e 74 20 69 6d 61 67 |...%% pr|int imag|
|000025e0| 65 20 77 69 74 68 20 74 | 68 65 73 65 20 64 69 6d |e with t|hese dim|
|000025f0| 65 6e 73 69 6f 6e 73 20 | 6f 6e 20 70 61 67 65 5c |ensions |on page\|
|00002600| 6e 22 0d 09 09 2c 28 69 | 6e 74 29 28 70 61 67 65 |n"...,(i|nt)(page|
|00002610| 52 65 63 74 50 74 72 2d | 3e 72 69 67 68 74 2d 70 |RectPtr-|>right-p|
|00002620| 61 67 65 52 65 63 74 50 | 74 72 2d 3e 6c 65 66 74 |ageRectP|tr->left|
|00002630| 29 2c 28 69 6e 74 29 28 | 70 61 67 65 52 65 63 74 |),(int)(|pageRect|
|00002640| 50 74 72 2d 3e 74 6f 70 | 2d 70 61 67 65 52 65 63 |Ptr->top|-pageRec|
|00002650| 74 50 74 72 2d 3e 62 6f | 74 74 6f 6d 29 29 3b 0d |tPtr->bo|ttom));.|
|00002660| 09 66 70 72 69 6e 74 66 | 28 66 69 6c 65 2c 0d 09 |.fprintf|(file,..|
|00002670| 09 22 2f 68 79 70 6f 74 | 65 6e 75 73 65 20 7b 64 |."/hypot|enuse {d|
|00002680| 75 70 20 6d 75 6c 20 65 | 78 63 68 20 64 75 70 20 |up mul e|xch dup |
|00002690| 6d 75 6c 20 61 64 64 20 | 73 71 72 74 7d 20 62 69 |mul add |sqrt} bi|
|000026a0| 6e 64 20 64 65 66 5c 6e | 22 0d 09 09 22 2f 70 69 |nd def\n|"..."/pi|
|000026b0| 78 65 6c 73 50 65 72 49 | 6e 63 68 20 67 73 61 76 |xelsPerI|nch gsav|
|000026c0| 65 20 69 6e 69 74 6d 61 | 74 72 69 78 20 37 32 20 |e initma|trix 72 |
|000026d0| 30 20 64 74 72 61 6e 73 | 66 6f 72 6d 20 68 79 70 |0 dtrans|form hyp|
|000026e0| 6f 74 65 6e 75 73 65 20 | 67 72 65 73 74 6f 72 65 |otenuse |grestore|
|000026f0| 20 64 65 66 5c 6e 22 29 | 3b 0d 09 69 66 28 63 65 | def\n")|;..if(ce|
|00002700| 6c 6c 73 50 65 72 49 6e | 63 68 21 3d 30 2e 30 29 |llsPerIn|ch!=0.0)|
|00002710| 7b 0d 09 09 66 70 72 69 | 6e 74 66 28 66 69 6c 65 |{...fpri|ntf(file|
|00002720| 2c 0d 09 09 09 22 2f 63 | 65 6c 6c 73 50 65 72 49 |,...."/c|ellsPerI|
|00002730| 6e 63 68 20 25 2e 32 66 | 20 64 65 66 09 25 25 20 |nch %.2f| def.%% |
|00002740| 68 61 6c 66 74 6f 6e 65 | 20 64 6f 74 20 66 72 65 |halftone| dot fre|
|00002750| 71 75 65 6e 63 79 5c 6e | 22 2c 63 65 6c 6c 73 50 |quency\n|",cellsP|
|00002760| 65 72 49 6e 63 68 29 3b | 0d 09 09 66 70 72 69 6e |erInch);|...fprin|
|00002770| 74 66 28 66 69 6c 65 2c | 0d 09 09 09 22 63 65 6c |tf(file,|...."cel|
|00002780| 6c 73 50 65 72 49 6e 63 | 68 20 63 75 72 72 65 6e |lsPerInc|h curren|
|00002790| 74 73 63 72 65 65 6e 20 | 34 20 2d 32 20 72 6f 6c |tscreen |4 -2 rol|
|000027a0| 6c 20 70 6f 70 20 33 20 | 31 20 72 6f 6c 6c 20 73 |l pop 3 |1 roll s|
|000027b0| 65 74 73 63 72 65 65 6e | 5c 6e 22 29 3b 0d 09 7d |etscreen|\n");..}|
|000027c0| 0d 09 69 66 28 67 72 61 | 79 4c 65 76 65 6c 73 21 |..if(gra|yLevels!|
|000027d0| 3d 30 29 7b 0d 09 09 66 | 70 72 69 6e 74 66 28 66 |=0){...f|printf(f|
|000027e0| 69 6c 65 2c 0d 09 09 09 | 22 2f 63 65 6c 6c 73 50 |ile,....|"/cellsP|
|000027f0| 65 72 49 6e 63 68 20 70 | 69 78 65 6c 73 50 65 72 |erInch p|ixelsPer|
|00002800| 49 6e 63 68 20 25 2e 32 | 66 20 64 69 76 20 64 65 |Inch %.2|f div de|
|00002810| 66 09 25 25 20 68 61 6c | 66 74 6f 6e 65 20 64 6f |f.%% hal|ftone do|
|00002820| 74 20 66 72 65 71 75 65 | 6e 63 79 5c 6e 22 0d 09 |t freque|ncy\n"..|
|00002830| 09 09 2c 73 71 72 74 28 | 67 72 61 79 4c 65 76 65 |..,sqrt(|grayLeve|
|00002840| 6c 73 2d 31 29 29 3b 0d | 09 09 66 70 72 69 6e 74 |ls-1));.|..fprint|
|00002850| 66 28 66 69 6c 65 2c 0d | 09 09 09 22 63 65 6c 6c |f(file,.|..."cell|
|00002860| 73 50 65 72 49 6e 63 68 | 20 63 75 72 72 65 6e 74 |sPerInch| current|
|00002870| 73 63 72 65 65 6e 20 34 | 20 2d 32 20 72 6f 6c 6c |screen 4| -2 roll|
|00002880| 20 70 6f 70 20 33 20 31 | 20 72 6f 6c 6c 20 73 65 | pop 3 1| roll se|
|00002890| 74 73 63 72 65 65 6e 5c | 6e 22 29 3b 0d 09 7d 0d |tscreen\|n");..}.|
|000028a0| 09 66 70 72 69 6e 74 66 | 28 66 69 6c 65 2c 0d 09 |.fprintf|(file,..|
|000028b0| 09 22 2f 73 20 6e 78 20 | 73 74 72 69 6e 67 20 64 |."/s nx |string d|
|000028c0| 65 66 09 09 25 25 20 73 | 74 72 69 6e 67 20 74 6f |ef..%% s|tring to|
|000028d0| 20 68 6f 6c 64 20 6f 6e | 65 20 72 61 73 74 65 72 | hold on|e raster|
|000028e0| 20 6c 69 6e 65 5c 6e 22 | 0d 09 09 22 6e 78 20 6e | line\n"|..."nx n|
|000028f0| 79 20 38 09 09 09 09 09 | 25 25 20 64 69 6d 65 6e |y 8.....|%% dimen|
|00002900| 73 69 6f 6e 73 20 61 6e | 64 20 62 69 74 73 2f 70 |sions an|d bits/p|
|00002910| 69 78 65 6c 20 6f 66 20 | 73 6f 75 72 63 65 20 69 |ixel of |source i|
|00002920| 6d 61 67 65 5c 6e 22 0d | 09 09 22 5b 6e 78 20 30 |mage\n".|.."[nx 0|
|00002930| 20 30 20 6e 79 20 6e 65 | 67 20 30 20 6e 79 5d 09 | 0 ny ne|g 0 ny].|
|00002940| 25 25 20 6d 61 70 20 75 | 6e 69 74 20 73 71 75 61 |%% map u|nit squa|
|00002950| 72 65 20 74 6f 20 50 69 | 78 4d 61 70 20 64 61 74 |re to Pi|xMap dat|
|00002960| 61 5c 6e 22 0d 09 09 22 | 7b 63 75 72 72 65 6e 74 |a\n"..."|{current|
|00002970| 66 69 6c 65 20 73 20 72 | 65 61 64 68 65 78 73 74 |file s r|eadhexst|
|00002980| 72 69 6e 67 20 70 6f 70 | 7d 09 25 25 20 72 65 61 |ring pop|}.%% rea|
|00002990| 64 20 64 61 74 61 5c 6e | 22 0d 09 09 22 62 69 6e |d data\n|"..."bin|
|000029a0| 64 09 09 09 09 09 25 25 | 20 73 70 65 65 64 20 75 |d.....%%| speed u|
|000029b0| 70 20 72 65 61 64 69 6e | 67 5c 6e 22 0d 09 09 22 |p readin|g\n"..."|
|000029c0| 69 6d 61 67 65 5c 6e 22 | 29 3b 0d 09 61 73 73 65 |image\n"|);..asse|
|000029d0| 72 74 28 73 69 7a 65 6f | 66 28 2a 62 79 74 65 29 |rt(sizeo|f(*byte)|
|000029e0| 3d 3d 31 29 3b 09 2f 2f | 20 72 65 71 75 69 72 65 |==1);.//| require|
|000029f0| 64 20 62 79 20 6f 75 72 | 20 61 6c 67 6f 72 69 74 |d by our| algorit|
|00002a00| 68 6d 0d 09 61 73 73 65 | 72 74 28 73 69 7a 65 6f |hm..asse|rt(sizeo|
|00002a10| 66 28 2a 77 6f 72 64 29 | 3d 3d 32 29 3b 09 2f 2f |f(*word)|==2);.//|
|00002a20| 20 72 65 71 75 69 72 65 | 64 20 62 79 20 6f 75 72 | require|d by our|
|00002a30| 20 61 6c 67 6f 72 69 74 | 68 6d 0d 09 66 6f 72 28 | algorit|hm..for(|
|00002a40| 69 3d 30 3b 69 3c 32 35 | 36 3b 69 2b 2b 29 7b 0d |i=0;i<25|6;i++){.|
|00002a50| 09 09 73 70 72 69 6e 74 | 66 28 73 74 72 69 6e 67 |..sprint|f(string|
|00002a60| 2c 22 25 30 32 78 22 2c | 28 69 6e 74 29 69 29 3b |,"%02x",|(int)i);|
|00002a70| 0d 09 09 68 65 78 5b 69 | 5d 3d 2a 28 75 6e 73 69 |...hex[i|]=*(unsi|
|00002a80| 67 6e 65 64 20 73 68 6f | 72 74 20 2a 29 73 74 72 |gned sho|rt *)str|
|00002a90| 69 6e 67 3b 0d 09 7d 0d | 09 77 69 64 74 68 3d 72 |ing;..}.|.width=r|
|00002aa0| 65 63 74 50 74 72 2d 3e | 72 69 67 68 74 2d 72 65 |ectPtr->|right-re|
|00002ab0| 63 74 50 74 72 2d 3e 6c | 65 66 74 3b 0d 09 62 79 |ctPtr->l|eft;..by|
|00002ac0| 74 65 73 3d 28 77 69 64 | 74 68 2b 31 29 2a 73 69 |tes=(wid|th+1)*si|
|00002ad0| 7a 65 6f 66 28 2a 77 6f | 72 64 29 3b 0d 09 62 75 |zeof(*wo|rd);..bu|
|00002ae0| 66 66 65 72 3d 28 75 6e | 73 69 67 6e 65 64 20 73 |ffer=(un|signed s|
|00002af0| 68 6f 72 74 20 2a 29 4e | 65 77 50 74 72 28 62 79 |hort *)N|ewPtr(by|
|00002b00| 74 65 73 29 3b 0d 09 69 | 66 28 62 75 66 66 65 72 |tes);..i|f(buffer|
|00002b10| 3d 3d 4e 55 4c 4c 29 50 | 72 69 6e 74 66 45 78 69 |==NULL)P|rintfExi|
|00002b20| 74 28 22 50 69 78 4d 61 | 70 54 6f 50 6f 73 74 53 |t("PixMa|pToPostS|
|00002b30| 63 72 69 70 74 28 25 73 | 29 3a 20 22 0d 09 09 22 |cript(%s|): "..."|
|00002b40| 6e 6f 20 72 6f 6f 6d 20 | 66 6f 72 20 25 6c 64 20 |no room |for %ld |
|00002b50| 62 79 74 65 20 62 75 66 | 66 65 72 2e 5c 6e 5c 30 |byte buf|fer.\n\0|
|00002b60| 30 37 22 2c 66 69 6c 65 | 6e 61 6d 65 2c 62 79 74 |07",file|name,byt|
|00002b70| 65 73 29 3b 0d 09 62 75 | 66 66 65 72 33 32 3d 28 |es);..bu|ffer32=(|
|00002b80| 75 6e 73 69 67 6e 65 64 | 20 73 68 6f 72 74 20 2a |unsigned| short *|
|00002b90| 29 53 74 72 69 70 41 64 | 64 72 65 73 73 28 62 75 |)StripAd|dress(bu|
|00002ba0| 66 66 65 72 29 3b 0d 09 | 66 6f 72 28 79 3d 72 65 |ffer);..|for(y=re|
|00002bb0| 63 74 50 74 72 2d 3e 74 | 6f 70 3b 79 3c 72 65 63 |ctPtr->t|op;y<rec|
|00002bc0| 74 50 74 72 2d 3e 62 6f | 74 74 6f 6d 3b 79 2b 2b |tPtr->bo|ttom;y++|
|00002bd0| 29 7b 0d 09 09 6d 6f 64 | 65 3d 74 72 75 65 33 32 |){...mod|e=true32|
|00002be0| 62 3b 0d 09 09 69 66 28 | 63 61 6e 33 32 29 53 77 |b;...if(|can32)Sw|
|00002bf0| 61 70 4d 4d 55 4d 6f 64 | 65 28 26 6d 6f 64 65 29 |apMMUMod|e(&mode)|
|00002c00| 3b 0d 09 09 62 79 74 65 | 3d 61 64 64 72 3b 0d 09 |;...byte|=addr;..|
|00002c10| 09 77 6f 72 64 3d 62 75 | 66 66 65 72 33 32 3b 0d |.word=bu|ffer32;.|
|00002c20| 09 09 66 6f 72 28 69 3d | 30 3b 69 3c 77 69 64 74 |..for(i=|0;i<widt|
|00002c30| 68 3b 69 2b 2b 29 20 2a | 77 6f 72 64 2b 2b 20 3d |h;i++) *|word++ =|
|00002c40| 20 68 65 78 5b 2a 62 79 | 74 65 2b 2b 5d 3b 0d 09 | hex[*by|te++];..|
|00002c50| 09 2a 77 6f 72 64 3d 30 | 3b 0d 09 09 69 66 28 63 |.*word=0|;...if(c|
|00002c60| 61 6e 33 32 29 53 77 61 | 70 4d 4d 55 4d 6f 64 65 |an32)Swa|pMMUMode|
|00002c70| 28 26 6d 6f 64 65 29 3b | 0d 09 09 66 70 72 69 6e |(&mode);|...fprin|
|00002c80| 74 66 28 66 69 6c 65 2c | 22 25 73 5c 6e 22 2c 28 |tf(file,|"%s\n",(|
|00002c90| 63 68 61 72 20 2a 29 62 | 75 66 66 65 72 29 3b 0d |char *)b|uffer);.|
|00002ca0| 09 09 61 64 64 72 2b 3d | 72 6f 77 42 79 74 65 73 |..addr+=|rowBytes|
|00002cb0| 3b 0d 09 7d 0d 09 48 53 | 65 74 53 74 61 74 65 28 |;..}..HS|etState(|
|00002cc0| 28 48 61 6e 64 6c 65 29 | 70 6d 2c 70 6d 53 74 61 |(Handle)|pm,pmSta|
|00002cd0| 74 65 29 3b 0d 09 44 69 | 73 70 6f 73 50 74 72 28 |te);..Di|sposPtr(|
|00002ce0| 28 50 74 72 29 62 75 66 | 66 65 72 29 3b 0d 09 66 |(Ptr)buf|fer);..f|
|00002cf0| 70 72 69 6e 74 66 28 66 | 69 6c 65 2c 22 72 65 73 |printf(f|ile,"res|
|00002d00| 74 6f 72 65 5c 6e 22 29 | 3b 0d 09 66 63 6c 6f 73 |tore\n")|;..fclos|
|00002d10| 65 28 66 69 6c 65 29 3b | 0d 09 53 65 74 46 69 6c |e(file);|..SetFil|
|00002d20| 65 49 6e 66 6f 28 66 69 | 6c 65 6e 61 6d 65 2c 27 |eInfo(fi|lename,'|
|00002d30| 54 45 58 54 27 2c 43 52 | 45 41 54 4f 52 29 3b 0d |TEXT',CR|EATOR);.|
|00002d40| 7d 0d 0d 76 6f 69 64 20 | 41 70 70 65 6e 64 54 6f |}..void |AppendTo|
|00002d50| 46 69 6c 65 28 63 68 61 | 72 20 2a 66 69 6c 65 6e |File(cha|r *filen|
|00002d60| 61 6d 65 2c 63 68 61 72 | 20 2a 73 74 72 69 6e 67 |ame,char| *string|
|00002d70| 29 0d 7b 0d 09 46 49 4c | 45 20 2a 66 69 6c 65 3b |).{..FIL|E *file;|
|00002d80| 0d 09 0d 09 66 69 6c 65 | 3d 66 6f 70 65 6e 28 66 |....file|=fopen(f|
|00002d90| 69 6c 65 6e 61 6d 65 2c | 22 61 22 29 3b 0d 09 69 |ilename,|"a");..i|
|00002da0| 66 28 66 69 6c 65 3d 3d | 4e 55 4c 4c 29 50 72 69 |f(file==|NULL)Pri|
|00002db0| 6e 74 66 45 78 69 74 28 | 22 41 70 70 65 6e 64 54 |ntfExit(|"AppendT|
|00002dc0| 6f 46 69 6c 65 3a 20 45 | 72 72 6f 72 20 69 6e 20 |oFile: E|rror in |
|00002dd0| 6f 70 65 6e 69 6e 67 20 | 66 69 6c 65 20 5c 22 25 |opening |file \"%|
|00002de0| 73 5c 22 5c 6e 22 2c 66 | 69 6c 65 6e 61 6d 65 29 |s\"\n",f|ilename)|
|00002df0| 3b 0d 09 66 70 72 69 6e | 74 66 28 66 69 6c 65 2c |;..fprin|tf(file,|
|00002e00| 22 25 73 22 2c 73 74 72 | 69 6e 67 29 3b 0d 09 66 |"%s",str|ing);..f|
|00002e10| 63 6c 6f 73 65 28 66 69 | 6c 65 29 3b 0d 7d 00 00 |close(fi|le);.}..|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e80| 00 00 01 00 00 00 04 d4 | 00 00 03 d4 00 00 00 96 |........|........|
|00002e90| 67 72 61 70 68 65 72 73 | 20 70 6f 69 6e 74 73 20 |graphers| points |
|00002ea0| 28 31 2f 37 32 22 29 2c | 0d 74 68 65 20 72 65 63 |(1/72"),|.the rec|
|00002eb0| 14 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |.PixMapT|oPostScr|
|00002ec0| 69 70 74 2e 63 54 02 00 | 00 00 50 61 72 74 53 49 |ipt.cT..|..PartSI|
|00002ed0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 ab bf ee 6a 00 00 | 00 00 00 00 05 6a 6c 0d |.....j..|.....jl.|
|00002f00| 74 68 61 74 20 79 6f 75 | 20 6b 65 65 70 20 69 6e |that you| keep in|
|00002f10| 20 6d 69 6e 64 20 74 68 | 61 74 20 41 70 70 6c 65 | mind th|at Apple|
|00002f20| 20 61 6e 64 20 41 64 6f | 62 65 0d 75 73 65 20 64 | and Ado|be.use d|
|00002f30| 69 66 66 65 72 65 6e 74 | 20 63 6f 6f 72 64 69 6e |ifferent| coordin|
|00002f40| 61 74 65 20 73 79 73 74 | 65 6d 73 2e 20 42 6f 74 |ate syst|ems. Bot|
|00002f50| 68 20 41 70 70 6c 65 20 | 61 6e 64 20 41 64 6f 62 |h Apple |and Adob|
|00002f60| 65 20 69 6e 63 72 65 61 | 73 65 20 78 20 66 72 6f |e increa|se x fro|
|00002f70| 6d 20 6c 65 66 74 20 74 | 6f 20 72 69 67 68 74 2e |m left t|o right.|
|00002f80| 00 00 00 f2 00 09 00 18 | 00 00 1c 8c 00 94 00 4e |........|.......N|
|00002f90| 15 c4 00 00 09 70 69 78 | 65 6c 53 69 7a 65 00 18 |.....pix|elSize..|
|00002fa0| 00 00 1c 8c 00 94 00 4e | 15 b4 00 00 09 72 6f 77 |.......N|.....row|
|00002fb0| 42 79 74 65 73 20 00 28 | 00 00 1c 8c 00 94 00 4e |Bytes .(|.......N|
|00002fc0| 15 9c 80 00 01 54 00 23 | 01 c6 02 00 94 20 00 00 |.....T.#|..... ..|
|00002fd0| 00 00 00 00 09 2a 72 65 | 63 74 50 74 72 20 00 16 |.....*re|ctPtr ..|
|00002fe0| 00 00 1c 8c 00 94 00 4e | 15 50 00 00 07 72 65 63 |.......N|.P...rec|
|00002ff0| 74 50 74 72 00 1c 00 00 | 1c 8c 00 94 00 4e 15 40 |tPtr....|.....N.@|
|00003000| 00 00 0d 28 2a 70 6d 29 | 2e 62 6f 75 6e 64 73 20 |...(*pm)|.bounds |
|00003010| 00 1c 00 00 1c 8c 00 94 | 00 4e 15 2c 00 00 0d 28 |........|.N.,...(|
|00003020| 2a 70 6d 29 2e 62 6f 75 | 6e 64 73 20 00 26 00 00 |*pm).bou|nds .&..|
|00003030| 1c 8c 00 94 00 4e 15 1c | 80 00 01 40 00 1f 01 b2 |.....N..|...@....|
|00003040| 01 fc 94 20 00 00 00 00 | 00 01 00 01 00 02 03 2a |... ....|.......*|
|00003050| 70 6d 00 12 00 00 1c 8c | 00 94 00 4e 14 80 00 00 |pm......|...N....|
|00003060| 03 70 6d 20 00 12 00 00 | 1c 8c 00 94 00 4e 14 70 |.pm ....|.....N.p|
|00003070| 00 00 03 70 6d 20 00 00 | 00 14 00 00 27 4f 00 d9 |...pm ..|....'O..|
|00003080| 00 00 00 00 00 00 26 1c | 00 d1 00 00 00 00 00 00 |......&.|........|
|00003090| 01 48 00 0e 00 18 00 00 | 27 4f 00 d9 00 c8 c0 bc |.H......|'O......|
|000030a0| 00 00 09 2a 72 65 63 74 | 50 74 72 20 00 16 00 00 |...*rect|Ptr ....|
|000030b0| 27 4f 00 d9 00 c8 c0 44 | 00 00 07 72 65 63 74 50 |'O.....D|...rectP|
|000030c0| 74 72 00 14 00 00 27 a3 | 00 db 00 c8 c0 34 00 00 |tr....'.|.....4..|
|000030d0| 05 61 64 64 72 20 00 18 | 00 00 28 31 00 e1 00 c8 |.addr ..|..(1....|
|000030e0| c0 24 00 00 09 72 6f 77 | 42 79 74 65 73 20 00 14 |.$...row|Bytes ..|
|000030f0| 00 00 26 9e 00 d4 00 c8 | c0 14 00 00 05 62 79 74 |..&.....|.....byt|
|00003100| 65 73 00 14 00 00 27 a3 | 00 db 00 c8 c0 04 00 00 |es....'.|........|
|00003110| 05 62 79 74 65 20 00 16 | 00 00 27 c8 00 dd 00 c8 |.byte ..|..'.....|
|00003120| bf f4 00 00 07 62 79 74 | 65 5b 69 5d 00 1c 00 00 |.....byt|e[i]....|
|00003130| 27 c8 00 dd 00 c8 bf e4 | 10 04 0d 68 65 78 5b 62 |'.......|...hex[b|
|00003140| 79 74 65 5b 69 5d 5d 20 | 00 18 00 00 27 c8 00 dd |yte[i]] |....'...|
|00003150| 00 c8 bf d4 00 00 09 68 | 65 78 5b 32 35 35 5d 20 |.......h|ex[255] |
|00003160| 00 16 00 00 26 31 00 d2 | 00 c8 bf c4 10 20 07 73 |....&1..|..... .s|
|00003170| 74 72 69 6e 67 20 00 10 | 00 00 26 1c 00 d1 00 c8 |tring ..|..&.....|
|00003180| bf b4 00 00 01 69 00 16 | 00 00 26 31 00 d2 00 c8 |.....i..|..&1....|
|00003190| bf a4 10 20 07 22 25 30 | 32 78 22 20 00 28 00 00 |... ."%0|2x" .(..|
|000031a0| 26 52 00 d2 00 c8 bf 94 | 00 00 19 2a 28 75 6e 73 |&R......|...*(uns|
|000031b0| 69 67 6e 65 64 20 73 68 | 6f 72 74 20 2a 29 73 74 |igned sh|ort *)st|
|000031c0| 72 69 6e 67 00 16 00 00 | 26 31 00 d2 00 c8 c0 b0 |ring....|&1......|
|000031d0| 10 20 07 73 74 72 69 6e | 67 20 00 00 00 1e 00 00 |. .strin|g ......|
|000031e0| 29 59 00 e7 00 00 00 00 | 00 00 29 b5 00 e8 00 00 |)Y......|..).....|
|000031f0| 00 00 00 00 28 99 00 e2 | 00 00 00 00 00 00 00 ae |....(...|........|
|00003200| 00 07 00 14 00 00 29 09 | 00 e4 00 61 bf 08 00 00 |......).|...a....|
|00003210| 05 77 69 64 74 68 00 18 | 00 00 29 1f 00 e5 00 61 |.width..|..)....a|
|00003220| bf 0c 10 04 09 77 6f 72 | 64 5b 2d 31 5d 20 00 18 |.....wor|d[-1] ..|
|00003230| 00 00 29 1f 00 e5 00 61 | be d4 00 00 09 62 79 74 |..)....a|.....byt|
|00003240| 65 5b 2d 31 5d 20 00 1c | 00 00 29 59 00 e7 00 61 |e[-1] ..|..)Y...a|
|00003250| be d8 10 20 0d 28 63 68 | 61 72 20 2a 29 77 6f 72 |... .(ch|ar *)wor|
|00003260| 64 20 00 1e 00 00 29 59 | 00 e7 00 61 be c8 10 20 |d ....)Y|...a... |
|00003270| 0f 28 63 68 61 72 20 2a | 29 62 75 66 66 65 72 20 |.(char *|)buffer |
|00003280| 00 16 00 00 28 67 00 e1 | 00 61 be b8 00 00 07 62 |....(g..|.a.....b|
|00003290| 75 66 66 65 72 20 00 18 | 00 00 28 67 00 e1 00 61 |uffer ..|..(g...a|
|000032a0| be a8 00 00 09 62 75 66 | 66 65 72 33 32 20 00 00 |.....buf|fer32 ..|
|000032b0| 00 1e 00 29 01 42 01 6a | 02 79 00 29 01 42 01 6a |...).B.j|.y.).B.j|
|000032c0| 02 79 00 00 17 b3 00 00 | 00 00 00 00 00 00 00 00 |.y......|........|
|000032d0| 00 00 00 34 00 02 00 00 | 2c 62 00 00 2c 6e 0d 41 |...4....|,b..,n.A|
|000032e0| 70 70 65 6e 64 54 6f 46 | 69 6c 65 00 00 00 1e f0 |ppendToF|ile.....|
|000032f0| 00 00 1f 02 13 50 69 78 | 4d 61 70 54 6f 50 6f 73 |.....Pix|MapToPos|
|00003300| 74 53 63 72 69 70 74 00 | 00 00 00 48 00 09 4d 6f |tScript.|...H..Mo|
|00003310| 6e 61 63 6f 00 00 00 00 | 00 00 00 00 00 00 00 00 |naco....|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 06 |........|........|
|00003330| 00 04 00 2a 00 03 01 8d | 02 7d 00 29 00 04 01 8c |...*....|.}.)....|
|00003340| 02 7c aa ed fd 6a 00 00 | 1e d1 00 00 1e d1 00 00 |.|...j..|........|
|00003350| 00 00 00 00 00 00 01 00 | 00 00 04 d4 00 00 03 d4 |........|........|
|00003360| 00 00 00 96 00 3a a4 e0 | 23 fe 00 00 00 1c 00 96 |.....:..|#.......|
|00003370| 00 02 44 54 56 55 00 02 | 00 1a 4d 50 53 52 00 02 |..DTVU..|..MPSR..|
|00003380| 00 3e 42 4b 50 54 00 01 | 00 62 08 24 ff ff 00 00 |.>BKPT..|.b.$....|
|00003390| 00 00 00 00 00 00 48 06 | ff ff 00 00 01 0e 00 00 |......H.|........|
|000033a0| 00 00 0e c5 ff ff 00 00 | 02 7c 00 00 00 00 03 f0 |........|.|......|
|000033b0| ff ff 00 00 03 2e 00 00 | 00 00 03 ef ff ff 00 00 |........|........|
|000033c0| 03 50 00 00 00 00 03 ed | ff ff 00 00 03 88 00 3a |.P......|.......:|
|000033d0| a1 a4 1d 02 ff ff 00 00 | 00 f6 00 00 00 00 38 76 |........|......8v|
|000033e0| ff ff 00 00 02 5a 00 00 | 00 00 00 00 00 00 00 00 |.....Z..|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+